From: dblack@... Date: 2007-06-07T23:41:57+09:00 Subject: Re: Mutually-Recursive Functions Hi -- On Thu, 7 Jun 2007, ara.t.howard wrote: > > On Jun 7, 2007, at 5:06 AM, dblack@wobblini.net wrote: > >> Hi -- >> >> On Thu, 7 Jun 2007, Harry Kakueki wrote: >> >>> On 6/7/07, Revence Kalibwani wrote: >>>> # That is, of course, a silly way to implemet even and odd. So, let >>>> me give you the problem >>>> # I was trying to solve. >>>> # >>>> # To generate the lettering similar to that above the spreadsheet >>>> columns, where the first >>>> # column has 'A', the second 'B' ... the twenty-sixth 'Z'. Then, >>>> the twenty-seventh has >>>> # 'AA', the twenty-eight has 'AB', and so on. This is recursive by >>>> nature. Here is what >>>> # should work: >>> >>> I may be missing something, but.. >>> >>> If you just want to do that then try something like this. >>> >>> arr = [] >>> ("a".."ff").each {|x| arr << x} >>> p arr >> >> Work-saving tip for the day: >> >> p [*"a".."ff"] >> >> :-) >> > > seems a bit perlish no? No, since you asked :-) It looks like that thing in Ruby where you use the unar[r]ay operator to unarray a range :-) David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)