Catamorphism: Difference between revisions
m
→{{header|Binary Lambda Calculus}}
imported>Tromp (add fold in BLC) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 616:
=={{header|Binary Lambda Calculus}}==
<pre>000001000110100000010110000000010111111110111001011111101111101101110</pre>
=={{header|BQN}}==
Line 2,515:
say reduce &infix:<max>, @list;
say reduce &infix:<lcm>, @list;</syntaxhighlight>
=={{header|Refal}}==
<syntaxhighlight lang="refal">$ENTRY Go {
, 1 2 3 4 5 6 7: e.List
= <Prout <Reduce Add e.List>>
<Prout <Reduce Mul e.List>>;
};
Reduce {
s.F t.I = t.I;
s.F t.I t.J e.X = <Reduce s.F <Mu s.F t.I t.J> e.X>;
};</syntaxhighlight>
{{out}}
<pre>28
5040</pre>
=={{header|REXX}}==
This REXX example is modeled after the Raku example (it is NOT a translation).
Line 2,572 ⟶ 2,587:
LCM: 2520
</pre>
=={{header|Ring}}==
<syntaxhighlight lang="ring">
|