on master help sign in
fixed molds doc
commite2f2b274fd4fc6dcff7d901fbc7f62f874b5381a authorDavid Kerschner <dkerschner@hcoop.net> dateMon 23 Sep 2019, 10:11 (7 years ago) parent9a771fb
1 file changed+4−4
learn/hoon/hoon-tutorial/molds.md+4−4
learn/hoon/hoon-tutorial/molds.md+4−4
@@ -1,11 +1,10 @@
11+++
2−title = "Molds"
3−weight = 0
2+title = "2.3.1 Molds"
3+weight = 28
44template = "doc.html"
55+++
66
7−A mold is a
8−[//]: # (You should finish this thought :P)
7+A mold is a function that coerces a noun to a type or crashes.
98
109Let's take some examples from `hoon.hoon`. `|$` is a new rune as of the writing of this document so you may see this spelled in slightly different way if you don't have the latest version of `hoon.hoon`. `|$` is the mold builder rune which takes a list of molds and produces a mold.
1110
@@ -14,6 +13,7 @@ Let's take some examples from `hoon.hoon`. `|$` is a new rune as of the writing
1413 |$ [head tail]
1514 [p=head q=tail]
1615```
16+
1717Here is a very simple mold builder. It takes two molds and produces a mold that is a pair of those with the faces `p` and `q`. An example of using this would be `(pair @ud @ud)` which would produce a mold for a cell of `@ud` and `@ud`.
1818
1919```