Catamorphism

From Rosetta Code
Revision as of 12:37, 19 February 2021 by Drkameleon (talk | contribs) (Replaced content with "=={{header|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 => (*) </...")

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