Skip to content

Latest commit

 

History

History
146 lines (103 loc) · 2.57 KB

OUTLINE.md

File metadata and controls

146 lines (103 loc) · 2.57 KB

Chapter 1: Appeasing the masses with code

  • The iex prompt
  • Strings
  • "REPL"
  • Simple maths

Chapter 2: Now, where did I put that value?

  • Variables
  • String interpolation

Chapter 3: Lovely lists

  • Why lists?
  • List syntax
  • Lists over multiple lines

Chapter 4: Marvellous Maps

  • Why maps?
  • Map syntax
  • [] -- accessing a value from a map
  • A list containing maps

Chapter 5: Funky functions

  • "Anonymous" function definitions
  • Calling anonymous functions .()
  • Multiple argument functions
  • Calling functions with wrong number of arguments
  • Running code with "Elixir"

Chapter 6: Pattern matching

  • TODO: Show [head | tail] example with just a single head element.

  • TODO: Redo complex pattern matching within a list, move 1 up to include whole map

  • Left + Right have to be equal

  • List pattern matching [head | tail]

  • Map pattern matching by key

  • Map + list combo pattern matching

  • Pattern matching inside functions

  • Matching maps inside functions

  • Matching anything

Chapter 7: Recap

  • Recap

Chapter 8: Working with strings, input and output

Strings

  • Reversing a string
  • Splitting a string
  • Replacing parts of a string
  • Upcase
  • Downcase

IO

  • Gets
  • Puts
  • String.trim/1

Immutability

  • What is immutability?

Chapter 9: Working with lists

  • List.first/1
  • List.last/1
  • What the "/1" at the end of a function means
  • The Enum module
  • Enum.reverse/1
  • Enum.each/2
  • Enum.map/2
  • BYO functions
  • Enum.reduce/2
  • Enum.sum/1
  • Enum.filter/2
  • Enum.find/2

Chapter 10: Working with maps

  • Enum.each/2, with a map
  • Tuple syntax
  • Enum.map/2, with a map
  • Enum.into/2
  • The pipe operator
  • Map.get/2
  • Map.put/3
  • Map.delete/2

Chapter 11: Working with files

  • IO module
  • Reading files
  • Writing files
  • Deleting files
  • Atoms
  • Tuples

Chapter 12: Conditional Code

  • Case
  • If / Unless
  • Cond
  • With

Chapter 13: Finding more functions

  • h + v helpers in iex prompt
  • Tab complete
  • Elixir docs link
  • Elixir school

Chapter 14: Modules Chapter

  • Why should we use modules?
  • Person module example
  • Demonstrate how to define modules
  • Structs within modules
  • Public vs. Private functions

Chapter 15: Mixing it up

  • Introduction to Mix, similar in approach to the official guide, but using concepts just from this book. No agents.

Chapter 16: Testing

  • Cover ExUnit, including DocTests

Chapter 17: Where to from here?

  • Link to other resources, like Programming Elixir

(?) Concurrency chapter

THOUGHT: Is this too advanced for a beginners book?

(?) Multi-process chapter

THOUGHT: Is this too advanced also?