on master help sign in
expands
commit2fe50db2ec47307e7c3f96f11bee2db6cae898ac authorJONATHAN PAPROCKI <jon@tlon.io> dateWed 27 May 2020, 17:59 (6 years ago) parent59bcce8
1 file changed+9−21
reference/hoon-expressions/rune/buc.md+9−21
reference/hoon-expressions/rune/buc.md+9−21
@@ -58,27 +58,16 @@ Irregular: `*` makes `%noun`, `^` makes `%cell`, `?` makes
5858
5959##### Expands to
6060
61−Still need help with this. From hoon.hoon:
6261```hoon
63− :: verify, $|
64− ::
65− {$bsbr *}
66− ^- hoon
67− :: push the raw product
68− ::
69− :+ %tsls relative(mod p.mod)
70− ^- hoon
71− :: assert
72− ::
73− :+ %wtbn
74− :: run the verifier
75− ::
76− [%cnhp [%tsbn $/3 q.mod] $/2]
77− :: produce verified product
78− ::
79− $/2
62+$|(a b)
63+```
64+expands to
65+```hoon
66+|= x=*
67+=/ foo ;;(a x)
68+?> (b foo)
69+b
8070```
81−
8271
8372##### Syntax
8473
@@ -86,8 +75,7 @@ Regular: **2-fixed**
8675
8776##### Discussion
8877
89−`$|` takes two arguments, a mold and a Hoon expression that is typically a gate
90−that is used to validate the structure produced by the mold to ensure that the noun
78+`$|` takes two arguments, a mold and a gate that produces a `flag` or loobean that is used to validate the structure produced by the mold to ensure that the noun
9179has a certain shape. It crashes if the input fails the validation test.
9280
9381For example, the elements of a `set` are treated as being