From: Jose Calderon-Celis Date: 2011-04-22T23:42:05+09:00 Subject: Re: Reversing a string without using array, classes and reverse function --20cf300513a880fd3e04a182dc02 Content-Type: text/plain; charset=ISO-8859-1 @Robert: Thanks, Cheers #!/usr/bin/env ruby # require 'rubygems' y = lambda{ | str | # puts " #{str}" str.empty? ? "" : y[ str[1..-1] ] + str[0] } s="1234567890" p s p y.call(s) output:./reverseL.rb "1234567890" "0987654321" --- Jose Calderon-Celis 2011/4/22 Robert Dober > What about > > y = lambda{ | str | str.empty? ? "" : y[ str[1..-1] ] + str[0] } > > Cheers > Robert > > > > --20cf300513a880fd3e04a182dc02--