@@ -1,68 +1,43 @@
1−`%= centis`
2−===========
1+---
2+sort: 1
3+---
34
4−Eval `p` w/ changes.
5+# `:make, %=, centis, {$make p/wing q/(list (pair wing seed))}`
56
6−Evaluates `p` with the changes specified in `q`, where `q` is a list of addresses ([`++wing`]())s followed by the values that will replace whatever value currently lies at that address. Makes the changes all at once to ensure that the product type is checked.
7+Take a wing (attribute path) with changes.
78
8−Like `%-`, `%=` has an addtional, irregular wifeform syntax that is frequently
9−used: `a(p q.p, q p.a)`, where `a` is the code to be executed with the changes
10−specified within the `()`.
9+## Produces
1110
12−Produces
13−--------
11+`p`, modified by the change list `q`.
1412
15−Twig: `[%cnts p=wing q=tram]`
13+If `p` resolves to a leg, `q` is a list of changes to that leg.
14+If `p` resolves to an arm, `q` is a list of changes to the core
15+containing that arm. We compute the arm on the modified core.
1616
17−Accepts
18−-------
17+## Syntax
1918
20−`p` is a `++wing`. `q` is a [++tram]().
19+Regular: *1-fixed*, then *jogging*.
2120
22−Tall form
23−---------
21+Irregular: `foo(x 1, y 2, z 3)` is `:make(foo x 1, y 2, z 3)`.
2422
25− %= p
26− p.i.q q.i.q
27− p.i.t.q q.i.t.q
28− ==
23+## Discussion
2924
30−Wide form
31−---------
25+Note that `p` is a wing, not a twig. Knowing that a function
26+call `(foo bar)` involves making `foo`, replacing its sample
27+at slot `+6` with `bar`, and taking the `$` limb, you might think
28+`(foo bar)` would mean `:(make foo +6 bar)`.
3229
33− %=(p p.i.q q.i.q, p.i.t.q q.i.t.q)
30+But it's actually `:pin(foo :(make $ +2 +6 bar))`. Even if `foo`
31+is a wing, we would just be mutating `+6` within the core that
32+defines the `foo` arm. Instead we want to modify the *product*
33+of `foo` -- the gate -- so we have to pin it into the subject.
3434
35−Irregular form
36−--------------
35+## Examples
3736
38− p(p.i.q q.i.q, p.i.t.q q.i.t.q)
39−
40−Examples
41−--------
42−
43− /~zod:dojo> =+ a=[p=5 q=6]
44− a(p 2)
45− [p=2 q=6]
46−
47−In this example we are using the irregular form of `%=` to replace `p`
48−in `a`.
49−
50− /~zod:dojo> =+ a=[p=1 q=2 r=3 s=4]
51− a(p 5, q 6, r 7, s 8)
52− [p=5 q=6 r=7 s=8]
53−
54−Here we show how you can replace multiple faces at once. We start with a
55−new `a` and replace all of its values with the irregular form of `%=`.
56−
57− /~zod:dojo> =+ step=0
58− =+ leng=10
59− =+ valu=0
60− |-
61− ?: =(step leng)
62− valu
63− $(valu (mul 2 valu), step +(step))
64− 1.024
65−
66−In this case we create a simple loop, using [`|-`](). To recurse, we use
67−`%=` with [`$`](), the empty name — our `|-` — replacing our `valu` with
68−`(mul 2 valu)` and `step` with `+(step)`.
37+```
38+~zod:dojo> =foo [p=5 q=6]
39+~zod:dojo> foo(p 42)
40+[p=42 q=6]
41+~zod:dojo> foo(+3 99)
42+[p=5 99]
43+```