Catamorphism: Difference between revisions
Content added Content deleted
Drkameleon (talk | contribs) (Undo revision 324479 by Drkameleon (talk)) |
Drkameleon (talk | contribs) (added Arturo) |
||
Line 274: | Line 274: | ||
{{out}} |
{{out}} |
||
<pre>{55, 3628800, "10987654321"}</pre> |
<pre>{55, 3628800, "10987654321"}</pre> |
||
=={{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 => (*)</lang> |
|||
{{out}} |
|||
<pre>10 |
|||
24</pre> |
|||
=={{header|BBC BASIC}}== |
=={{header|BBC BASIC}}== |