Your Turn

  • Exercise: Functions-5

    Use the &… notation to rewrite the following.

    • Enum.map [1,2,3,4], fn x -> x + 2 end

    • Enum.each [1,2,3,4], fn x -> IO.inspect x end

Get Programming Elixir now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.