on master help sign in
runes discussion
commit12ba071b79aa326a8da9248cb32121e8328421b1 authorGalen Wolfe-Pauly <root@office-for.com> dateThu 24 Mar 2016, 14:54 (11 years ago) parent8bc9bd3
12 files changed+84−101
docs/system/hoon/runes/bc/shoe.md → docs/system/hoon/runes/bc/bccb.md+3−3 docs/system/hoon/runes/bc/bank.md → docs/system/hoon/runes/bc/bccl.md+3−3 docs/system/hoon/runes/bc/book.md → docs/system/hoon/runes/bc/bccn.md+4−4 docs/system/hoon/runes/bc/bchp.md+15 docs/system/hoon/runes/bc/bush.md → docs/system/hoon/runes/bc/bcpm.md+4−5 docs/system/hoon/runes/bc/claw.md → docs/system/hoon/runes/bc/bcpt.md+4−4 docs/system/hoon/runes/bc/bcts.md+21 docs/system/hoon/runes/bc/bcwt.md+23 docs/system/hoon/runes/bc/coat.md−21 docs/system/hoon/runes/bc/lamb.md−15 docs/system/hoon/runes/bc/pick.md−22 docs/system/hoon/runes/br/brcb.md+7−24
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}`
22
3−The product: a mold whose product is always `p`.
3+Type as a single example.
44
5−Usage: define a type as a single example.
5+Product: a mold whose product is always `p`.
66
77Regular form: *1-fixed*.
88
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)}`
22
3−The product: a mold which applies the tuple `p` to its sample.
3+Tuple of molds
44
5−Usage: define a record type.
5+Product: a mold which applies the tuple `p` to its sample.
66
77Regular form: *running*.
88
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)}`
22
3−The product: a mold producing the tagged union of the molds in
3+Tagged union
4+
5+Product: a mold producing the tagged union of the molds in
46`p`, all of which must be of the form `:bank(stem bulb)`, where
57`stem` is an atomic mold.
68
7−Usage: define a type which is a tagged union.
8−
99Regular form: *running*.
1010
1111Examples:
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}`
22
3−The product: a mold which applies `p` if the head of its sample
4−is a cell, `q` if the head of its sample is a cell.
3+Union of two cells: one w/cellular head & other w/atomic head.
54
6−Usage: add a default pair behavior (like "autocons" in Nock
7−formulas) to a tagged union type.
5+Product: a mold which applies `p` if the head of its sample
6+is a cell, `q` if the head of its sample is a cell.
87
98Regular form: *2-fixed*.
109
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}`
22
3−The product: a mold which applies `p` if its sample is an atom,
4−`q` if its sample is a cell.
3+Type: either an atom or a cell.
54
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.
77
88Regular form: *2-fixed*.
99
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 @@
22sort: 7
33---
44
5−`|_ barcab`
6−===========
5+# `:door`, `|_`, "buccab", `{$door p/moss q/(map term twig)}`
76
87Door: core with sample (input values).
98
10−Similar to [`|%`](), but also takes input data (aka [sample]())
9+Product: a core whose sample is `p` and arms are `q`.
10+
11+Regular form: *1-fixed*, then *battery*
12+
13+Similar to `|%`, but also takes input data (aka sample)
1114available within the entire core. Cores of this type are called doors.
1215Moreover, `|_` only accepts [dry or `%elm`]() arms--in other words,
1316type checking on these arms is performed on the input before computation.
1417
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
35−--------
18+Examples:
3619
3720 /~zod/try=> =mol
3821 |_ a=@ud