on master help sign in
runes discussion
12ba071Galen Wolfe-Pauly
docs/system/hoon/runes/bc/shoe.md → docs/system/hoon/runes/bc/bccb.mdrenamed+3−3
@@ -1,8 +1,8 @@
1−# `:shoe`, `$_`, "buccab", `{$shoe p/twig}`
1+# `:shoe, $_, "buccab", {$shoe p/twig}`
2
2
3−The product: a mold whose product is always `p`.
3+Type as a single example.
4
4
5−Usage: define a type as a single example.
5+Product: a mold whose product is always `p`.
6
6
7Regular form: *1-fixed*.
7Regular form: *1-fixed*.
8
8
docs/system/hoon/runes/bc/bank.md → docs/system/hoon/runes/bc/bccl.mdrenamed+3−3
@@ -1,8 +1,8 @@
1−# `:bank`, `$:`, "buccol", `{$bank p/(list moss)}`
1+# `:bank, $:, "buccol", {$bank p/(list moss)}`
2
2
3−The product: a mold which applies the tuple `p` to its sample.
3+Tuple of molds
4
4
5−Usage: define a record type.
5+Product: a mold which applies the tuple `p` to its sample.
6
6
7Regular form: *running*.
7Regular form: *running*.
8
8
docs/system/hoon/runes/bc/book.md → docs/system/hoon/runes/bc/bccn.mdrenamed+4−4
@@ -1,11 +1,11 @@
1−# `:book`, `$%`, "buctis", `{$book p/(list moss)}`
1+# `:book, $%, "buctis", {$book p/(list moss)}`
2
2
3+Tagged union
4+
3−The product: a mold producing the tagged union of the molds in
5+Product: a mold producing the tagged union of the molds in
4`p`, all of which must be of the form `:bank(stem bulb)`, where
6`p`, all of which must be of the form `:bank(stem bulb)`, where
5`stem` is an atomic mold.
7`stem` is an atomic mold.
6
8
7−Usage: define a type which is a tagged union.
8−
9Regular form: *running*.
9Regular form: *running*.
10
10
11Examples:
11Examples:
docs/system/hoon/runes/bc/bchp.mdnew file+15
@@ -0,0 +1,15 @@
1+# `:lamb, $-, "buchep", {$lamb p/moss q/moss}`
2+
3+Function type.
4+
5+Product: a mold producing a gate accepting
6+
7+Regular form: *2-fixed*.
8+
9+Example:
10+```
11+~zod:dojo> =a :lamb($foo $bar)
12+
13+~zod:dojo> ($:a %foo)
14+%bar
15+```
docs/system/hoon/runes/bc/bush.md → docs/system/hoon/runes/bc/bcpm.mdrenamed+4−5
@@ -1,10 +1,9 @@
1−# `:bush`, `$&`, "bucpam", `{$bush p/moss q/moss}`
1+# `:bush, $&, "bucpam", {$bush p/moss q/moss}`
2
2
3−The product: a mold which applies `p` if the head of its sample
3+Union of two cells: one w/cellular head & other w/atomic head.
4−is a cell, `q` if the head of its sample is a cell.
5
4
6−Usage: add a default pair behavior (like "autocons" in Nock
5+Product: a mold which applies `p` if the head of its sample
7−formulas) to a tagged union type.
6+is a cell, `q` if the head of its sample is a cell.
8
7
9Regular form: *2-fixed*.
8Regular form: *2-fixed*.
10
9
docs/system/hoon/runes/bc/claw.md → docs/system/hoon/runes/bc/bcpt.mdrenamed+4−4
@@ -1,9 +1,9 @@
1−# `:claw`, `$@`, "bucpat", `{$claw p/moss q/moss}`
1+# `:claw, $@, "bucpat", {$claw p/moss q/moss}`
2
2
3−The product: a mold which applies `p` if its sample is an atom,
3+Type: either an atom or a cell.
4−`q` if its sample is a cell.
5
4
6−Usage: define a type which is either an atom or a cell.
5+Product: a mold which applies `p` if its sample is an atom,
6+`q` if its sample is a cell.
7
7
8Regular form: *2-fixed*.
8Regular form: *2-fixed*.
9
9
docs/system/hoon/runes/bc/bcts.mdnew file+21
@@ -0,0 +1,21 @@
1+# `:coat, $=, "buctis", {$coat p/@tas q/moss}`
2+
3+Add variable name
4+
5+Product: a mold which puts the label `p` on the mold `q`.
6+
7+Regular form: *2-fixed*.
8+
9+Irregular form:
10+```
11+a/b :coat(a b)
12+```
13+
14+Examples:
15+
16+```
17+~zod:dojo> =a :coat(p $foo)
18+
19+~zod:dojo> (a %bar)
20+p=%foo
21+```
docs/system/hoon/runes/bc/bcwt.mdnew file+23
@@ -0,0 +1,23 @@
1+# `:pick, $?, "bucwut", {$? p/(list moss)}`
2+
3+Generalized type union.
4+
5+Product: a mold which tries each of the alternatives in `p`.
6+
7+Note: Use `:pick` only if none of `:book` (`$%`), `:claw` (`$@`) or `:bush` (`$&`) applies.
8+
9+Regular form: *running*.
10+
11+Example:
12+```
13+~zod:dojo> =a :pick($foo $bar $baz)
14+
15+~zod:dojo> (a %baz)
16+%baz
17+
18+~zod:dojo> (a [37 45])
19+%foo
20+
21+~zod:dojo> $:a
22+$foo
23+```
docs/system/hoon/runes/bc/coat.mddeleted−21
@@ -1,21 +0,0 @@
1−# `:coat`, `$=`, "buctis", `{$coat p/@tas q/moss}
2−
3−The product: a mold which puts the label `p` on the mold `q`.
4−
5−Usage: name a typed attribute or variable.
6−
7−Regular form: *2-fixed*.
8−
9−Irregular form:
10−```
11−a/b :coat(a b)
12−```
13−
14−Examples:
15−
16−```
17−~zod:dojo> =a :coat(p $foo)
18−
19−~zod:dojo> (a %bar)
20−p=%foo
21−```
docs/system/hoon/runes/bc/lamb.mddeleted−15
@@ -1,15 +0,0 @@
1−# `:lamb`, `$-`, "buchep", `{$lamb p/moss q/moss}`
2−
3−The product: a mold producing a gate accepting
4−
5−Usage: define a function type.
6−
7−Regular form: *2-fixed*.
8−
9−Example:
10−```
11−~zod:dojo> =a :lamb($foo $bar)
12−
13−~zod:dojo> ($:a %foo)
14−%bar
15−```
docs/system/hoon/runes/bc/pick.mddeleted−22
@@ -1,22 +0,0 @@
1−# `:pick`, `$?`, "bucwut", `{$? p/(list moss)}`
2−
3−The product: a mold which tries each of the alternatives in `p`.
4−
5−Usage: a generalized type union. Use `:pick` only if none of
6−`:book` (`$%`), `:claw` (`$@`) or `:bush` (`$&`) applies.
7−
8−Regular form: *running*.
9−
10−Example:
11−```
12−~zod:dojo> =a :pick($foo $bar $baz)
13−
14−~zod:dojo> (a %baz)
15−%baz
16−
17−~zod:dojo> (a [37 45])
18−%foo
19−
20−~zod:dojo> $:a
21−$foo
22−```
docs/system/hoon/runes/br/brcb.md+7−24
@@ -2,37 +2,20 @@
2sort: 7
2sort: 7
3---
3---
4
4
5−`|_ barcab`
5+# `:door`, `|_`, "buccab", `{$door p/moss q/(map term twig)}`
6−===========
7
6
8Door: core with sample (input values).
7Door: core with sample (input values).
9
8
9+Product: a core whose sample is `p` and arms are `q`.
10+
11+Regular form: *1-fixed*, then *battery*
12+
10−Similar to [`|%`](), but also takes input data (aka [sample]())
13+Similar to `|%`, but also takes input data (aka sample)
11available within the entire core. Cores of this type are called doors.
14available within the entire core. Cores of this type are called doors.
12Moreover, `|_` only accepts [dry or `%elm`]() arms--in other words,
15Moreover, `|_` only accepts [dry or `%elm`]() arms--in other words,
13type checking on these arms is performed on the input before computation.
16type checking on these arms is performed on the input before computation.
14
17
15−Produces
16−--------
17−
18−Twig: `[%brcb p=twig q=(map term foot)]`
19−
20−Accepts
21−-------
22−
23−`p` is a a [mold](). `q` is a [`++map`]() with [`++term`]() keys and
24−[`++foot`]() values.
25−
26−Tall form
27−---------
28−
29− |_ p
30− ++ p.n.q
31− q.n.q
32− --
33−
34−Examples
18+Examples:
35−--------
36
19
37 /~zod/try=> =mol
20 /~zod/try=> =mol
38 |_ a=@ud
21 |_ a=@ud