summaryrefslogtreecommitdiff
path: root/golf_prelude.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-21 06:20:24 (GMT)
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-21 06:20:24 (GMT)
commitc8d17d71d788d704e11221a6b81ce31961250e6c (patch)
tree7201baa70b9ac0ac8c5d11445e396058b17d8453 /golf_prelude.rb
parent687308cf0dab0af675e40da2b6ab8ccd5f77c072 (diff)
added `f` for 1 byte FizzBuzz because Hexagony has such feature
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'golf_prelude.rb')
-rw-r--r--golf_prelude.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/golf_prelude.rb b/golf_prelude.rb
index e45f4ca..204f659 100644
--- a/golf_prelude.rb
+++ b/golf_prelude.rb
@@ -50,6 +50,11 @@ class Object
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