@@ -8,7 +8,38 @@ aliases = ["/docs/learn/hoon/hoon-tutorial/molds/"]
8A mold is an idempotent function that coerces a [noun](/docs/glossary/noun/) to
8A mold is an idempotent function that coerces a [noun](/docs/glossary/noun/) to
9be of a specific type or crashes.
9be of a specific type or crashes.
12+The simplest molds to understand are arms of cores created with `+$`
15++$ height [feet=@ud inches=@ud]
18+A mold is compiled to a gate that takes in any noun and produces a typed value, or crashes:
22+:: produces [feet=5 inches=11]
29+To coerce using a gate, it's good practice to use the `;;` rune, which can parse inline molds.
34+:: produces [feet=5 inches=11]
37+;;([feet=@ud inches=@ud] [5 11])
38+:: produces [feet=5 inches=11]
11−`|$` 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.
42+`|$` is the mold builder rune which takes a list of molds and produces a mold.
13`|$` implements [parametric
44`|$` implements [parametric
14polymorphism](https://en.wikipedia.org/wiki/Parametric_polymorphism) in Hoon,
45polymorphism](https://en.wikipedia.org/wiki/Parametric_polymorphism) in Hoon,