Showing posts with label palindromes. Show all posts
Showing posts with label palindromes. Show all posts

Friday, 27 April 2007

Why's online Ruby (and palindromes)

I've pointed people there in the past, but I haven't actually used Why's try-out-ruby site before.

I don't know how he does it (using his sandbox perhaps?) but it's great.

Try:
10.times do |x| puts x ; end

or

"a man a plan a canal panama".reverse
(There's even a whole page dedicated to this palindrome here.