On Fri, Sep 14, 2012 at 5:46 PM, Josh Cheek <josh.cheek / gmail.com> wrote:
> strings.inject("") { |joined, current| joined + current }
>
> is slow and wasteful because it created all the intermediate forms: "", "a",
> "ab", "abc", "abcd", "abcde"

but josh, isn't that because of String#+  ?

there is always String#<< or String#concat.

nonetheless, am also a fan of inject syntax, and hope to see someday,
a more super fast version of inject. The inject syntax is stupidly
generic/flexible, that is why many luv it, including me ;-)

btw, i usually use each.with_object instead of each_with_object. And i
alias with_object to using_object.  but hey, that is just me. but
regardless, we all are fan of ruby, right?  to each, his each, i guess
 ;-)

kind regards -botp