TIL: Anonymous Functions Can Have Multiple Heads
There is no need to use case inside of anonymous function - instead, we can create function with multiple heads. list = [1, 2, 3, {4, 5}, 6, {7, 8}] Enum.each(list, fn {first_value, secon_value} -> IO.puts("Tuple: #{first_value}, #{secon_value}") element -> IO.puts("Simple element: #{element}") end) ...