From: Jano Svitok Date: 2007-06-07T19:41:53+09:00 Subject: Re: Mutually-Recursive Functions On 6/7/07, Revence Kalibwani wrote: > Bruno Michel wrote: > > For the even and odd example, it works if you remplace odd by my_odd > > in the my_even function, and even by my_even in the my_odd function. > > Like this: > > > > def my_even(x) > > x == 0 or my_odd(x - 1) > > end > > > > def my_odd(x) > > x != 0 and my_even(x - 1) > > end > > > > my_even(10) #=> true > > > > > > Hope this helps. > > > Yeah. Solved it. Lots of typos. That happens under stress. Thanks a lot, > everyone. :-) For this very case, String#succ and String.succ! might be helpful ('A'.succ -> 'B', 'Z'.succ -> 'AA').