Fizzbuzz d = ->(n) { (n%2 == 0 ? 1 : 0) + (n%3 == 0 ? 2 : 0) } (1..15).each { p [nil,:fizz,:buzz,:fizzbuzz][d.(_1)] || _1 }