summaryrefslogtreecommitdiff
path: root/vere/doc/spec/nock/5.txt
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-10-05 21:56:51 +0700
committerpolwex <polwex@sortug.com>2025-10-05 21:56:51 +0700
commitfcedfddf00b3f994e4f4e40332ac7fc192c63244 (patch)
tree51d38e62c7bdfcc5f9a5e9435fe820c93cfc9a3d /vere/doc/spec/nock/5.txt
claude is gud
Diffstat (limited to 'vere/doc/spec/nock/5.txt')
-rw-r--r--vere/doc/spec/nock/5.txt39
1 files changed, 39 insertions, 0 deletions
diff --git a/vere/doc/spec/nock/5.txt b/vere/doc/spec/nock/5.txt
new file mode 100644
index 0000000..54261c5
--- /dev/null
+++ b/vere/doc/spec/nock/5.txt
@@ -0,0 +1,39 @@
+A noun is an atom or a cell. An atom is a natural number. A cell is an ordered
+pair of nouns.
+
+nock(a) *a
+[a b c] [a [b c]]
+
+?[a b] 0
+?a 1
++[a b] +[a b]
++a 1 + a
+=[a a] 0
+=[a b] 1
+=a =a
+
+/[1 a] a
+/[2 a b] a
+/[3 a b] b
+/[(a + a) b] /[2 /[a b]]
+/[(a + a + 1) b] /[3 /[a b]]
+/a /a
+
+*[a [b c] d] [*[a b c] *[a d]]
+
+*[a 0 b] /[b a]
+*[a 1 b] b
+*[a 2 b c] *[*[a b] *[a c]]
+*[a 3 b] ?*[a b]
+*[a 4 b] +*[a b]
+*[a 5 b] =*[a b]
+
+*[a 6 b c d] *[a 2 [0 1] 2 [1 c d] [1 0] 2 [1 2 3] [1 0] 4 4 b]
+*[a 7 b c] *[a 2 b 1 c]
+*[a 8 b c] *[a 7 [[7 [0 1] b] 0 1] c]
+*[a 9 b c] *[a 7 c 2 [0 1] 0 b]
+*[a 10 [b c] d] *[a 8 c 7 [0 3] d]
+*[a 10 b c] *[a c]
+
+*a *a
+