on 492ae2f help sign in
30 lines 688 B history raw
1# `:pin`, `=+`, "tislus" `{$pin p/twig q/twig}`
3Push variable onto the subject.
5Pushes a new variable `p` onto the subject and then executes `q` against it.
6Can use `$=` to put an optional face (variable name) on the value.
8Examples:
10 ~zod/try=>
11 =+ a=1
12 a
13 1
15The simplest case of a `=+`, we push `a=1` on to our subject, and
16produce `a`.
18 ~zod/try=>
19 =cor |= a=@
20 =+ b=1
21 =+ c=2
22 :(add a b c)
23 new var %cor
24 ~zod/try=>
25 (cor 0)
26 3
28This is a common case of `=+`, when we need to add intermediate values
29to our subject to divide up our computation. `=+` makes for procedural,
30top to bottom code organization.