Skip to content

Commit

Permalink
added f for 1 byte FizzBuzz because Hexagony has such feature
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed May 21, 2018
1 parent 687308c commit c8d17d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions golf_prelude.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ def h(a = 'H', b = 'w', c = '!')
puts "#{a}ello, #{b}orld#{c}"
end

def f(m = 100)
1.upto(m){|n|puts'FizzBuzz
'[i=n**4%-15,i+13]||n}
end

alias say puts

def do_while
Expand Down

0 comments on commit c8d17d7

Please sign in to comment.