aboutsummaryrefslogtreecommitdiff
path: root/help/scan.md
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-01-19 15:10:38 -0500
committerGitHub <noreply@github.com>2022-01-19 15:10:38 -0500
commitce364aeae795ca8a8e46e653b8024ac5a9ad0982 (patch)
tree7af238dbdb370a768f965066dadadd144cbd70f7 /help/scan.md
parent8f0aa14fa695ff3aa3b3ed96c02fdb2ab99f272c (diff)
parentedddb9be0aa1f03c8608d3dabf7ccfea3fdde206 (diff)
Merge pull request #55 from razetime/master
Simple help pages for Primitive Symbols
Diffstat (limited to 'help/scan.md')
-rw-r--r--help/scan.md31
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⟩
+
+