Catamorphism: Difference between revisions

Content added Content deleted
(add BQN)
Line 414: Line 414:


BQN has two different primitives for catamorphism:
BQN has two different primitives for catamorphism:
<ul>
- Fold(<code>´</code>): Works on lists only.
- Insert(<code>˝</code>): Works on arrays with higher rank.
<li>Fold(<code>´</code>): Works on lists only.</li>
<li>Insert(<code>˝</code>): Works on arrays with higher rank.</li>
</ul>


Both of these primitives take a dyadic function, and an optional initial element.
Both of these primitives take a dyadic function, and an optional initial element.