匿名函数
f = fn
{:a, :b} -> IO.puts "Tuple {:a, :b}"
[] -> IO.puts "Empty list"
end
f.({:a, :b}) # Tuple {:a, :b}
f.([]) # Empty list
f = fn
{:a, :b} -> IO.puts "Tuple {:a, :b}"
[] -> IO.puts "Empty list"
end
f.({:a, :b}) # Tuple {:a, :b}
f.([]) # Empty list