Catamorphism
Arturo
<lang rebol>; find the sum, with seed:0 (default) print fold [1 2 3 4] => (+)
- find the product, with seed
- 1
print fold [1 2 3 4] .seed:1 => (*) </lang>
- Output:
10 24
<lang rebol>; find the sum, with seed:0 (default) print fold [1 2 3 4] => (+)
print fold [1 2 3 4] .seed:1 => (*) </lang>
10 24