Help - Glossary -
I -
inject:
The inject: method is an elegant way to deal with functions. For more, see a
good introduction to Smalltalk, and consider
the following example, on which you can use Cmd-p:
| array sum |
array := #(1 2 3 4 5 6 7 8 9 10).
sum := array inject: 0 into: [ :item :element | item + element].
^ sum