Matthew Rudy wrote: > yeah, > that's pretty nice Paul. Thanks Matthew :-) The thing that impressed me was that what felt like a very "natural" Ruby implementation (not using anything tricky or obscure) ended up being (in my opinion) just as concise and efficient as the Haskell solution which intimately relies on lazy evaluation to achieve its efficiency. > I do like passing a block to Struct.new, > never thought about that before, but it makes sense. Something that I discovered as I was thinking about this problem, in fact! Cheers! Paul. -- Posted via http://www.ruby-forum.com/.