Skip to content

Instantly share code, notes, and snippets.

@sorah sorah/fizzbuzz.rb forked from kazuho/fizzbuzz.js
Created Aug 9, 2012

Embed
What would you like to do?
fizz = f = lambda {
fizz = lambda {
fizz = lambda {
fizz = f
"Fizz"
}
nil
}
nil
}
buzz = b = lambda {
buzz = lambda {
buzz = lambda {
buzz = lambda {
buzz = lambda {
buzz = b
"Buzz"
}
nil
}
nil
}
nil
}
nil
}
puts (1..100).map {|i| (_ = "#{fizz[]}#{buzz[]}").empty? ? i.to_s : _ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.