From: Colin Bartlett Date: 2010-04-11T21:51:44+09:00 Subject: Re: Is it possible, a fully general Enumerable#recursive ? On Sat, Apr 10, 2010 at 7:05 PM, Intransition wrote: > On Apr 9, 6:38 pm, Colin Bartlett wrote: >> I'm not sure that it is a bug. ... > > Thanks, that helped me understand a little better. > > After working on this for far too long, I have concluded that a highly > generalized implementation of recursion for all (or at least most) > enumerable methods not feasible. http://www.askoxford.com/concise_oed/feasible?view=uk feasible: adjective 1 possible and practical to achieve easily or conveniently. 2 informal likely. I think that's the precise word: I'd concluded that it was probably possible, but probably too complicated, and I was having difficulties getting things to work with "to_enum" in a consistent way, or indeed sometime at all. (For example, a recursive Array#map! worked, but a recursive Array#map didn't.) > But there are still many things in common between recursion methods, > so instead I have created a Recursor class > to act something like an Enumerator for recursive operations. The idea of having a Recursor class hadn't occurred to me, and that seems (at first thoughts) quite possibly fruitful as a solution.