diff --git a/docs/html/FuncRef.html b/docs/html/FuncRef.html index 856e805..13e4c3d 100644 --- a/docs/html/FuncRef.html +++ b/docs/html/FuncRef.html @@ -1,4 +1,4 @@ -
Version -10.0.0
Each function, combinator, or definition should be documented here.
Not negative.
+Version -10.0.0
Each function, combinator, or definition should be documented here.
Not negative.
n !-
----------- n < 0
false
@@ -572,7 +572,20 @@ program.)combinator
Short-circuiting Boolean OR
+Accept two quoted programs, run the first and expect a Boolean value, if
+it’s false pop it and run the second program (which should also return a
+Boolean value) otherwise pop the second program (leaving true on the
+stack.) The quoted programs are run with [nullary].
[A] [B] or
+---------------- A -> false
+ B
+
+
+ [A] [B] or
+---------------- A -> true
+ true
+[dup] the second item on the stack over the first.
a b over
--------------
a b a
@@ -950,13 +963,4 @@ from each list. The smallest list sets the length of the result list.
[1 2 3] [4 5 6] zip
-------------------------
[[1 4] [2 5] [3 6]]
-
combinator
Short-circuiting Boolean OR
Accept two quoted programs, run the first and expect a Boolean value, if
-it’s false pop it and run the second program (which should also return a
-Boolean value) otherwise pop the second program (leaving true on the
-stack.)
- [A] [B] ||
- ---------------- A -> false
- B
- [A] [B] ||
- ---------------- A -> true
- true
[[2 1] [7 0] [1 0] [19 1] [18 1] [3 1]]
+
+See DeriveZip notebook. Not that it matters +for this application because we are about to multiply these pairs and, +of course, multiplication is commutative.
Now, for each pair we want to multiply the pairs (using the duality of Booleans as integers to convert the numbers we want to work on to themselves and the numbers we do not want to work on to zero which is the --I don't recall the jargon!-- zero times anything is zero, and zero plus anything is that thing, and we use that in a moment to get around actually filtering our list!) As I was saying we multiply the pairs, then square the result, then sum all the results:
[[1 2] [0 7] [0 1] [1 19] [1 18] [1 3]]
diff --git a/docs/reference/Function-Reference.md b/docs/reference/Function-Reference.md
index 2d4da7f..8e49a71 100644
--- a/docs/reference/Function-Reference.md
+++ b/docs/reference/Function-Reference.md
@@ -1981,18 +1981,6 @@ Like [getitem] but [swap]s the order of arguments.
[getitem]
-
-------------------------------------------------------------------------
-
-## or
-
-Logical bit-wise OR.
-
-### Crosslinks
-
-[and]
-
-
------------------------------------------------------------------------
## over
@@ -3247,26 +3235,23 @@ Unquote (using [i]) the list that is second on the stack.
------------------------------------------------------------------------
-## ||
+## or
Combinator
Short-circuiting Boolean OR
-
-### Discussion
-
Accept two quoted programs, run the first and expect a Boolean value, if
it’s `false` pop it and run the second program (which should also return a
Boolean value) otherwise pop the second program (leaving `true` on the
-stack.)
+stack.) The quoted programs are run with [nullary].
- [A] [B] ||
+ [A] [B] or
---------------- A -> false
B
- [A] [B] ||
+ [A] [B] or
---------------- A -> true
true
diff --git a/docs/source/notebooks/NerdSnipe.md b/docs/source/notebooks/NerdSnipe.md
index f6eb9ec..3b173b0 100644
--- a/docs/source/notebooks/NerdSnipe.md
+++ b/docs/source/notebooks/NerdSnipe.md
@@ -69,6 +69,14 @@ Clunky, but we now have our list of filter integers. `zip` to transpose the two
[[1 2] [0 7] [0 1] [1 19] [1 18] [1 3]]
+# UGH! Pairs are in reverse order! Python vs. our Nice New Definition!
+
+ [[2 1] [7 0] [1 0] [19 1] [18 1] [3 1]]
+
+See [DeriveZip notebook](/notebooks/DeriveZip.html). Not that it matters
+for this application because we are about to multiply these pairs and,
+of course, multiplication is [commutative](https://en.wikipedia.org/wiki/Commutative).
+
Now, for each pair we want to multiply the pairs (using the duality of Booleans as integers to convert the numbers we want to work on to themselves and the numbers we do not want to work on to zero which is the --I don't recall the jargon!-- zero times anything is zero, and zero plus anything is that thing, and we use that in a moment to get around actually filtering our list!) As I was saying we multiply the pairs, then square the result, then sum all the results:
[[1 2] [0 7] [0 1] [1 19] [1 18] [1 3]]