Josselin wrote:
> On 2007-02-17 17:09:32 +0100, Stefan Rusterholz <apeiros / gmx.net> said:
> 
>>> then for each friend.contact , I write an array
>>> 
>> end
>> 
>> There are probably nicer ways to write the recursive variant. Feel free
>> to evolve it.
>> 
>> Iterative version is left as an exercise to the reader ;-) (with ruby
>> the iterative variant of this
>> is most probably quite a bit faster btw.)
>> 
>> My regards
> 
> thanks a lot ! that's great...  I'll try to find a recursive variant 
> later..
> 
> joss

Seems to be a misunderstanding. The one I provided code for *is* the 
recursive variant. In this case I found it easier to write and think it 
is easier to understand than the iterative version.

My regards

-- 
Posted via http://www.ruby-forum.com/.