How to use conditional inside Enum iterator - error:cannot invoke remote function Kernel.elem/2 inside a match

It is also possible to write an anonymous function with multiple heads.

Enum.map(l, fn 
  {_, 0} -> "hello"
  _ -> ...
end)

No need for a case :slight_smile:

UPDATE: it should be {_, 1} → “hello”