It is also possible to write an anonymous function with multiple heads.
Enum.map(l, fn
{_, 0} -> "hello"
_ -> ...
end)
No need for a case ![]()
UPDATE: it should be {_, 1} → “hello”
It is also possible to write an anonymous function with multiple heads.
Enum.map(l, fn
{_, 0} -> "hello"
_ -> ...
end)
No need for a case ![]()
UPDATE: it should be {_, 1} → “hello”