On Wed, May 27, 2009 at 3:38 PM, Daniel Carrera <
daniel.carr...@theingots.org> wrote:

> The terms I've seen are "fold" and "reduce". The "fold" term is not just
> from Haskell. I've seen it elsewhere. If you had said "inject" I wouldn't
> have known what you meant.
>

The name "inject" comes from Smalltalk, where you :inject the initial value
:into the operation, whose arguments are the accumulator and the new item
(it has no "fold-1" variant).

Wikipedia mentions "accumulate" (C++) and "compress" (no example cited) as
additional names.

In Perl6, I assume [...] automatically folds left on left-associative
operators and right on right-associative ones?

-- 
Mark J. Reed <markjr...@gmail.com>

Reply via email to