From: Martin DeMello Date: 2004-07-12T16:32:28+09:00 Subject: Re: Ruby quickies and useful idioms Sam Stephenson wrote: > > Wow, I didn't know about Enumerable#inject. Semantically, it's not > quite the same as foldl: for instance, it doesn't make sense to foldl > (or foldr) a Hash, since you're not guaranteed any order. Practically > speaking, however, it's much nicer, since I can use it with Range. My favourite 'practical' feature is that it tests for a seed value, and defaults to foldl1 if none is given. martin