on master help sign in
Clams
81c0605Matthew Levan
docs/arvo/network.md+6−5
@@ -205,11 +205,12 @@ urbit, this output:
205 [%pong %received 'Pong']
205 [%pong %received 'Pong']
206
206
207Most of the code should be straightforward. In `++poke-atom`, the only new thing
207Most of the code should be straightforward. In `++poke-atom`, the only new thing
208−is the expression `` `@t`tom ``, which is casting the argument `tom` to type
208+is the expression `` `@t`tom ``, which is *casting* the argument `tom` to type
209−`@t`. As we already know, `@t` is the type of "cord" text strings. In Hoon,
209+`@t`. As we already know, `@t` is the type of "cord" (text string). In Hoon,
210−when types are called using tick marks, they serve as a validator function
210+when types are called using tick marks, they serve as a validator function--
211−called a "clam" -- that is, a function whose domain is all nouns, and
211+that is, a function whose domain is all nouns, and range is the given type
212−range is the given type (in this case, `@t`).
212+(in this case, `@t`). When a type is called as a function (`(@t tom)`, for
213+example), it is called a "clam". A clam behaves the same as a cast.
213
214
214In simpler terms, if a clam is passed a value of its own type, it produces that
215In simpler terms, if a clam is passed a value of its own type, it produces that
215value. Otherwise, it produces the default value (aka the "bunt") of its type.
216value. Otherwise, it produces the default value (aka the "bunt") of its type.