Koans (http://github.com/thbar/elixir-playground) test "function declaration and invocation" do sum = fn (a, b) -> a + b end assert sum.(2, 10) == 12 tuple_sum = fn { a, b, c, d } -> a + b + c + d end assert tuple_sum.({ 10, 100, 1000, 10000 }) == 11110 end Thibaut Barrère (
[email protected]) - juillet 2016