Skip to content

Latest commit

 

History

History
32 lines (17 loc) · 658 Bytes

fold.md

File metadata and controls

32 lines (17 loc) · 658 Bytes

View this file with results and syntax highlighting here.

Acute Accent (´)

𝔽´ 𝕩: Fold

→full documentation

Fold over 𝕩 with 𝔽 from right to left i.e. Insert 𝔽 between the elements of 𝕩.

𝕩 must be a simple list (1 = =𝕩).

    +´ 1‿2‿3

    1+2+3

    -´ 1‿2‿3

    1-2-3

𝕨 𝔽´ 𝕩: Fold With Initial

→full documentation

Monadic fold, but use 𝕨 as initial right argument.

    5 +´ 1‿2‿3

    1+2+3+5

    5 -´ 1‿2‿3

    1-2-3-5