minor edits to the tis runes
commitaddb6f612310a9c6c376bac485a1699f0adb9768
authorjoshuareagan <joshuareagan@gmail.com>
dateWed 10 Oct 2018, 11:21 (8 years ago)
parent48f43e0
docs/reference/rune/tis/ban.udon+1−1
@@ -11,7 +11,7 @@
1111
1212## Produces
1313
14−`q`, evaluated with the product of `p` as its subject.
14+the product of `q`, with the product of `p` taken as the subject.
1515
1616## Syntax
1717
docs/reference/rune/tis/bar.udon+3−2
@@ -21,8 +21,9 @@ Regular: *2-fixed*.
2121
2222## Discussion
2323
24−`=|` "declares a variable" which is "uninitialized," presumably
25−because you'll set it in a loop or similar.
24+The default (or 'bunt') value of `p` is pinned to the head of the subject. Usually `p` includes a name for ease of reference.
25+
26+Speaking more loosely, `=|` usually "declares a variable" which is "uninitialized," presumably because you'll set it in a loop or similar.
2627
2728## Examples
2829
docs/reference/rune/tis/col.udon+4
@@ -19,6 +19,10 @@
1919
2020Regular: *jogging*, then *1-fixed*.
2121
22+## Discussion
23+
24+This rune is like `=.`, but for modifying the values of multiple legs of the subject.
25+
2226## Examples
2327
2428```
docs/reference/rune/tis/com.udon+2−5
@@ -9,10 +9,7 @@
99
1010`[%tscm p=hoon q=hoon]`: expose namespace
1111
12−`p` evaluates to a noun with some namespace. From within `q` you may access `p`'s
13−names without a wing path (i.e., you can use face `b` rather than `b.p`), or without
14−invoking a core name when `p` is a core. This is especially useful for calling arms
15−from an imported library or for calling arms from an stdlib core repeatedly.
12+`p` evaluates to a noun with some namespace. From within `q` you may access `p`'s names without a wing path (i.e., you can use face `b` rather than `b.p`). This is especially useful for calling arms from an imported library core or for calling arms from a stdlib core repeatedly.
1613
1714## Syntax
1815
@@ -20,7 +17,7 @@ Regular: *2-fixed*.
2017
2118## Examples
2219
23−With a core:
20+With an imported core:
2421
2522```
2623> (sum -7 --7)
docs/reference/rune/tis/dot.udon+2−3
@@ -21,9 +21,8 @@ Regular: *3-fixed*.
2121
2222## Discussion
2323
24−As usual, we are not actually mutating the subject, just creating
25−a new subject with a changed value. Note that the mutation uses
26−[`%_` ("cencab")](../../cen/cab/), so the type doesn't change. Trying to change the value type results in a `nest-fail`.
24+Technically the `=.` rune doesn't change the subject. It creates
25+a new subject just like the old one except for a changed value at `p`. Note that the mutation uses [`%_` ("cencab")](../../cen/cab/), so the type at `p` doesn't change. Trying to change the value type results in a `nest-fail`.
2726
2827## Examples
2928
docs/reference/rune/tis/hep.udon+1−2
@@ -21,8 +21,7 @@ Regular: *2-fixed*.
2121
2222## Discussion
2323
24−`=-` looks better than `=+` when the expression you're pinning
25−is much smaller than the expression that uses it.
24+`=-` is just like `=+` but its subexpressions are reversed. `=-` looks better than `=+` when the expression you're pinning to the subject is much smaller than the expression that uses it.
2625
2726## Examples
2827
docs/reference/rune/tis/ket.udon+5−3
@@ -22,10 +22,12 @@ Regular: *4-fixed*.
2222
2323## Discussion
2424
25−We use `=^` ("tisket" when we have a state machine with a function that
25+`p` is a new name (possibly with type annotation, e.g., `a=@`) of a value to be pinned to the subject. The value of `p` is the head of the product of `r`. `q` is given the value of the tail of `r`'s product. Then `s` is evaluated against this new subject.
26+
27+We generally use `=^` when we have a state machine with a function, `r`, that
2628produces a cell, whose head is a result and whose tail is a new
27−state. We want to use the head as a new variable, and stuff the
28−tail back into wherever we stored the old state.
29+state. The head value is given a new name `p`, and the
30+tail is stuffed back into wherever we stored the old state, `q`.
2931
3032This may also remind you of Haskell's State monad.
3133
docs/reference/rune/tis/led.udon+1−1
@@ -19,7 +19,7 @@
1919
2020Regular: *2-fixed*.
2121
22−Irregular: `foo:bar` is `=<(foo bar)`.
22+Irregular: `foo:baz` is `=<(foo baz)`.
2323
2424## Discussion
2525
docs/reference/rune/tis/lus.udon+3−1
@@ -21,7 +21,9 @@ Regular: *2-fixed*.
2121
2222## Discussion
2323
24−`=+` ("tislus") is the simplest way of "declaring a variable."
24+The subject of the `=+` expression, call it `a`, becomes the cell `[p a]` for the evaluation of `q`. That is, `=+` 'pins a value', `p`, to the head of the subject.
25+
26+Loosely speaking, `=+` is the simplest way of "declaring a variable."
2527
2628## Examples
2729
docs/reference/rune/tis/mic.udon+5−2
@@ -7,8 +7,7 @@
77
88# `=; "tismic"`
99
10−`[%tssm p=skin q=hoon r=hoon]`: combine a named and/or typed noun with the
11−subject, inverted.
10+`[%tssm p=skin q=hoon r=hoon]`: combine a named noun with the subject, possibly with type annotation; inverted order.
1211
1312## Expands to
1413
@@ -20,6 +19,10 @@ subject, inverted.
2019
2120Regular: *3-fixed*.
2221
22+## Discussion
23+
24+`=;` is exactly like `=/` except that the order of its last two subexpressions is reversed.
25+
2326## Examples
2427
2528```
docs/reference/rune/tis/net.udon+4−5
@@ -7,18 +7,17 @@
77
88# `=/ "tisnet"`
99
10−`[%tsfs p=skin q=hoon r=hoon]`: combine a named and/or typed
11−noun with the subject.
10+`[%tsfs p=skin q=hoon r=hoon]`: combine a named noun with the subject, possibly with type annotation.
1211
1312## Expands to
1413
15−*if `p` is a symbol*, (e.g. `a`):
14+*if `p` is a name*, (e.g. `a`):
1615
1716```
1817=+(^=(p q) r)
1918```
2019
21−*if `p` is a symbol with a type* (e.g., `a=@`):
20+*if `p` is a name with a type* (e.g., `a=@`):
2221
2322```
2423=+(^-(p q) r)
@@ -40,7 +39,7 @@ Regular: *3-fixed*.
4039
4140## Discussion
4241
43−`p` can be either a symbol or a symbol=type. If it's just a symbol,
42+`p` can be either a name or a name=type. If it's just a name,
4443`=/` ("tisnet") "declares a type-inferred variable." If it has a type, `=/`
4544"declares a type-checked variable."
4645
docs/reference/rune/tis/sig.udon+6−1
@@ -20,6 +20,12 @@ Regular: *running*.
2020## Examples
2121
2222```
23+~zod:dojo> =~ [sub (mul 3 20) (add 10 20)]
24+ (sub +)
25+ +(.)
26+ ==
27+31
28+
2329~zod:dojo> =foo =| n=@
2430 =< =~ increment
2531 increment
@@ -28,7 +34,6 @@ Regular: *running*.
2834 ==
2935 |%
3036 ++ increment
31− |-
3237 ..increment(n +(n))
3338 --
3439~zod:dojo> foo
docs/reference/rune/tis/tar.udon+1−3
@@ -19,9 +19,7 @@ Regular: *3-fixed*.
1919
2020## Discussion
2121
22−The difference between aliasing and pinning is that the subject
23−noun stays the same; the alias is just recorded in its type.
24−`q` is calculated every time you use the `p` alias.
22+The difference between aliasing and pinning is that pinning changes the subject, but for aliasing the subject noun stays the same. The aliased expression, `q`, is recorded in the type information of `p`. `q` is calculated every time you use the `p` alias.
2523
2624## Examples
2725
docs/reference/rune/tis/wut.udon+1−1
@@ -7,7 +7,7 @@
77
88# `=? "tiswut"`
99
10−`[$tswt p/wing q/hoon r/hoon s/hoon]`: conditionally change one leg in the subject.
10+`[$tswt p=wing q=hoon r=hoon s=hoon]`: conditionally change one leg in the subject.
1111
1212## Expands to
1313
docs/reference/rune/zap/gar.udon → docs/reference/rune/zap/ban.udonrenamed+1−1
@@ -11,7 +11,7 @@
1111
1212## Produces
1313
14−A cell whose tail is `p`, and whose head is the static type of `p`.
14+A cell whose tail is the product of `p`, and whose head is the static type of `p`.
1515
1616## Syntax
1717
docs/reference/rune/zap/wut.udon+1−1
@@ -11,7 +11,7 @@
1111## Produces
1212
1313`q`, if `p` is greater than or equal to the Hoon kelvin version.
14−(Versions count down; the current version is 143.)
14+(Versions count down; the current version is 141.)
1515
1616## Syntax
1717