aboutsummaryrefslogtreecommitdiff
path: root/tutorial
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-03-14 20:55:07 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-03-14 20:55:07 -0400
commit84039bf5248090b30845c1106f45a182e4aee901 (patch)
treecc5e9a616d62cd06f1e057a3b3a157115466bdaf /tutorial
parentd1b1bff0ac771da4f2431f7570e4e77749cc595e (diff)
Walk through one of the ∘ expressions
Diffstat (limited to 'tutorial')
-rw-r--r--tutorial/expression.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/tutorial/expression.md b/tutorial/expression.md
index 4c2b79b1..813e751f 100644
--- a/tutorial/expression.md
+++ b/tutorial/expression.md
@@ -193,6 +193,8 @@ Made it to the last role, the 2-modifier (if you think something's been skipped,
<!--GEN
Primitives ⟨"∘%j%Atop"⟩
-->
+For example, the first expression `3 ט∘+ 4` expands to `ט 3 + 4`. Summing up, we get `ט 7`, which from the previous section is `7 × 7`, or `49`.
+
It's past time we covered how the syntax for modifiers works. Remember how I told you you hated learning the order of operations? No? Good. Modifiers bind more tightly than functions, so they are called on their operands before those operands can be used as arguments. As the parentheses above suggest, modifiers associate from left to right, the opposite order as functions. For example, the first expression above is evaluated in the order shown below. First we construct the square function `ט`, then compose it with `+`, and finally apply the result to some arguments.
<!--GEN