Learn Elixir — chapter by chapter explanation of Programming Elixir 1.6 (by Dave Thomas)

Programming Elixir 1.6 — Chapter 5 Summary

Willson Mock
3 min readNov 26, 2018
  1. Chapter 1 and 2 — OOP, Functional Programming, and Pattern Matching
  2. Chapter 3 — Immutability
  3. Chapter 4 — Basic Elixir Types
  4. Chapter 5 — Anonymous Functions (this post)
  5. Chapter 6 — Modules and Named Functions (coming soon)
  6. Chapter 7 — Lists and Recursion (coming soon)
  7. Chapter 8 and 9 — Maps, Structs, and Keyword Lists in Detail (coming soon)
  8. Chapter 10 — Processing Collections (coming soon)
  9. Chapter 11 — Strings and Binaries (coming soon)
  10. Chapter 12 — Control Flow (coming soon)

Welcome back to my 4th post in this series where I share key learnings from each chapter of Programming Elixir 1.6. If you haven’t read my previous posts yet, feel free to check those out first before continuing. In this post, I’ll be discussing anonymous functions in Elixir.

Chapter 5

  1. Basic syntax of anonymous functions

Anonymous functions begin with the fn keyword and end with the end keyword. In between the fn and end keywords, you declare your parameter list followed by your function body. So far, this is very similar to other languages like JavaScript and Ruby.

--

--

Willson Mock

I’m an avid learner, and I write about web technologies, personal fitness, and other fun stuff. http://willsonmock.com