Fizzbuzz with no conditional logic
fizz = fn {0, 0, _} -> "FizzBuzz" {0, _, _} -> "Fizz" {_, 0, _} -> "Buzz" {_, _, a} -> "#{a}" end foo = fn (n) -> "#{IO.puts(fizz.({rem(n,3), rem(n,5), n}))}" end for i <- 1..100 do foo.(i) end