From: ts Date: 2002-06-18T01:22:19+09:00 Subject: Re: yield and recursion, how to ? >>>>> "J" == Jean-Hugues ROBERT writes: Well, I've not understood what you want to do but I'll write something like this J> def each( block = nil, &syntax_block ) J> block ||= syntax_block J> block.call( self, @children.length()) J> @children.each do |x| J> x.each block J> end J> end def each yield self, @children.size @children.each do |x| x.each do |y| yield y end end end Guy Decoux