Yet Another Ruby FizzBuzz その3
divisible_by = lambda { |base, num| (num % base).zero? }.curry divisible_by_15 = divisible_by[15] divisible_by_3 = divisible_by[3] divisible_by_5 = divisible_by[5] (1..100).each do |i| puts case i when divisible_by_15 then 'FizzBuzz' when divisible_by_3 then 'Fizz' when divisible_by_5 then 'Buzz' else i end end