diff options
Diffstat (limited to 'help/scan.md')
| -rw-r--r-- | help/scan.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/help/scan.md b/help/scan.md new file mode 100644 index 00000000..c2e92f67 --- /dev/null +++ b/help/scan.md @@ -0,0 +1,31 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/scan.html).* + +# Grave (`` ` ``) + +## ``𝔽` 𝕩``: Fold + +Scan over `𝕩` with `𝔽` from left to right, producing intermediate values. + + + +` 1‿2‿3 + + ⟨1, 1+2, (1+2)+3⟩ + + -` 1‿2‿3 + + ⟨1, 1-2, (1-2)-3⟩ + + +## ``𝕨 𝔽` 𝕩``: Scan With initial + +Monadic scan, but use `𝕨` as initial left argument. + + 5 +` 1‿2‿3 + + ⟨5+1, (5+1)+2, ((5+1)+2)+3⟩ + + 5 -` 1‿2‿3 + + ⟨5-1, (5-1)-2, ((5-1)-2)-3⟩ + + |
