blob: 3684d96c2ed90d1a9ad7cc94edb648cad518c8cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/fold.html).*
# Acute Accent (`´`)
## `𝔽´ 𝕩`: Fold
Fold over `𝕩` with `𝔽` from right to left i.e. Insert `𝔽` between the elements of `𝕩`.
+´ 1‿2‿3
1+2+3
-´ 1‿2‿3
1-2-3
## `𝕨 𝔽´ 𝕩`: Fold With initial
Monadic fold, but use `𝕨` as initial right argument.
5 +´ 1‿2‿3
1+2+3+5
5 -´ 1‿2‿3
1-2-3-5
|