on master help sign in
bar
32c88d6Henry Ault
docs/system/hoon/runes/br/brcb.md+8−8
@@ -6,19 +6,19 @@ sort: 7
6
6
7Door: core with sample (input values).
7Door: core with sample (input values).
8
8
9−Product: a core whose sample is `p` and arms are `q`.
9+Produces: a core whose sample is `p` and arms are `q`.
10
10
11Regular form: *1-fixed*, then *battery*
11Regular form: *1-fixed*, then *battery*
12
12
13Similar to `|%`, but also takes input data (aka sample)
13Similar to `|%`, but also takes input data (aka sample)
14available within the entire core. Cores of this type are called doors.
14available within the entire core. Cores of this type are called doors.
15−Moreover, `|_` only accepts [dry or `%elm`]() arms--in other words,
15+Moreover, `|_` only accepts dry or `%elm` arms--in other words,
16type checking on these arms is performed on the input before computation.
16type checking on these arms is performed on the input before computation.
17
17
18Examples:
18Examples:
19
19
20 /~zod/try=> =mol
20 /~zod/try=> =mol
21− |_ a=@ud
21+ |_ a/@ud
22 ++ succ +(a)
22 ++ succ +(a)
23 ++ prev (dec a)
23 ++ prev (dec a)
24 --
24 --
@@ -27,14 +27,14 @@ Examples:
27 /~zod/try=> ~(succ mol ~(succ mol ~(prev mol 5)))
27 /~zod/try=> ~(succ mol ~(succ mol ~(prev mol 5)))
28 6
28 6
29
29
30−In this example we create a door `mol` that operates on a [`@ud`](),
30+In this example we create a door `mol` that operates on a `@ud`,
31`a`. We add two arms to our door, `++succ` and `++prev`, and invoke them
31`a`. We add two arms to our door, `++succ` and `++prev`, and invoke them
32−with the irregular form of [`%~`](). Doors are commonly invoked with
32+with the irregular form of `%~`. Doors are commonly invoked with
33`%~`, irregular form `~(arm door sample)`, which replaces the door's
33`%~`, irregular form `~(arm door sample)`, which replaces the door's
34sample and calls the specified arm.
34sample and calls the specified arm.
35
35
36 /~zod/try=> =kom
36 /~zod/try=> =kom
37− |_ a=(list)
37+ |_ a/(list)
38 ++ hed -.a
38 ++ hed -.a
39 ++ tal +.a
39 ++ tal +.a
40 --
40 --
@@ -56,7 +56,7 @@ sample and calls the specified arm.
56
56
57Here we're demonstrating the difference between `|_` and `|/`. We create
57Here we're demonstrating the difference between `|_` and `|/`. We create
58a nearly identical door using both runes, each with an arm that produces
58a nearly identical door using both runes, each with an arm that produces
59−the tail of the sample `a`. You can see that [wet]() functions use the
59+the tail of the sample `a`. You can see that wet functions use the
60sample as a mold to produce well-typed output.
60sample as a mold to produce well-typed output.
61
61
62 ++ ne
62 ++ ne
@@ -82,5 +82,5 @@ arms who all take the same sample.
82
82
83Here we put `++ne` to work a bit. Our first call renders 12 in base 16.
83Here we put `++ne` to work a bit. Our first call renders 12 in base 16.
84Since `99` is within the ASCII character range, we can cast it to a
84Since `99` is within the ASCII character range, we can cast it to a
85−[`@t`]() and get `'c'`. Conveniently, casting `12` to a [`@ux`]()
85+`@t` and get `'c'`. Conveniently, casting `12` to a `@ux`
86results in `0xc`.
86results in `0xc`.
docs/system/hoon/runes/br/brcn.md+19−58
@@ -2,42 +2,20 @@
2sort: 1
2sort: 1
3---
3---
4
4
5−`|% barcen`
5+# `:core, |%, "buccab", {$shoe p/twig}`
6−===========
7
6
8Generic core.
7Generic core.
9
8
10−Constructs a generic core with n named expressions, closed with `--`. Cores are
9+Produces: a core with `p`, an associative array with `++term` keys and `++foot` values.
11−similar to an object with named properties (aka [arms]()) that can contain either functions or data. Accepts both [dry or `%elm`]() and [wet or `%ash`]() arms.
12
10
13−Produces
11+Regular form: *Battery*
14−--------
15
12
16−Twig: `[%brcn p=(map term foot)]`
13+Example:
17−
18−Accepts
19−-------
20−
21−`p` is a [`++map`]() with [`++term`]() keys and [`++foot`]() values, which
22−are called arms.
23−
24−Tall form
25−---------
26−
27− |%
28− ++ p.n.q
29− q.n.q
30− +- p.n.l.q
31− q.n.l.q
32− --
33−
34−Examples
35−--------
36
14
37 /~zod/try=>
15 /~zod/try=>
38 =a |%
16 =a |%
39 ++ n 100
17 ++ n 100
40− ++ g |= b=@
18+ ++ g |= b/@
41 (add b n)
19 (add b n)
42 --
20 --
43 new var %a
21 new var %a
@@ -54,7 +32,7 @@ function. `g` adds our constant `n` to whatever is passed to it.
54 ++ r 100
32 ++ r 100
55 ++ s 4
33 ++ s 4
56 --
34 --
57− ++ g |= b=@
35+ ++ g |= b/@
58 (div (add b r:l) s:l)
36 (div (add b r:l) s:l)
59 --
37 --
60 changed %a
38 changed %a
@@ -67,36 +45,19 @@ and make our function `g` a bit more complicated. `g` now computes the
67sum of its argument and the arm `r` inside `l`, and divides that by `s`
45sum of its argument and the arm `r` inside `l`, and divides that by `s`
68inside `l`.
46inside `l`.
69
47
70− ++ yo
71− |% ++ cet 36.524 :: (add 24 (mul 100 365))
72− ++ day 86.400 :: (mul 24 hor)
73− ++ era 146.097 :: (add 1 (mul 4 cet))
74− ++ hor 3.600 :: (mul 60 mit)
75− ++ jes 106.751.991.084.417 :: (mul 730.692.561 era)
76− ++ mit 60
77− ++ moh `(list ,@ud)`[31 28 31 30 31 30 31 31 30 31 30 31 ~]
78− ++ moy `(list ,@ud)`[31 29 31 30 31 30 31 31 30 31 30 31 ~]
79− ++ qad 126.144.001 :: (add 1 (mul 4 yer))
80− ++ yer 31.536.000 :: (mul 365 day)
81− --
82−
83−[`++yo`](), found in `hoon.hoon`, uses `|%` to create a core whose arms
84−contain constant data for calculating time. As the following examples
85−shows, `|%` is also used to encapsulate arms that perform calculations.
86−
87 ++ si :: signed integer
48 ++ si :: signed integer
88 |%
49 |%
89− ++ abs |=(a=@s (add (end 0 1 a) (rsh 0 1 a)))
50+ ++ abs |=(a/@s (add (end 0 1 a) (rsh 0 1 a)))
90− ++ dif |=([a=@s b=@s] (sum a (new !(syn b) (abs b))))
51+ ++ dif |=([a/@s b/@s] (sum a (new !(syn b) (abs b))))
91− ++ dul |=([a=@s b=@] =+(c=(old a) ?:(-.c (mod +.c b) (sub b +.c))))
52+ ++ dul |=([a/@s b/@] =+(c=(old a) ?:(-.c (mod +.c b) (sub b +.c))))
92− ++ fra |= [a=@s b=@s]
53+ ++ fra |= [a/@s b/@s]
93 (new =(0 (mix (syn a) (syn b))) (div (abs a) (abs b)))
54 (new =(0 (mix (syn a) (syn b))) (div (abs a) (abs b)))
94− ++ new |=([a=? b=@] `@s`?:(a (mul 2 b) ?:(=(0 b) 0 +((mul 2 (dec b))))))
55+ ++ new |=([a/? b/@] `@s`?:(a (mul 2 b) ?:(=(0 b) 0 +((mul 2 (dec b))))))
95− ++ old |=(a=@s [(syn a) (abs a)])
56+ ++ old |=(a/@s [(syn a) (abs a)])
96− ++ pro |= [a=@s b=@s]
57+ ++ pro |= [a/@s b/@s]
97 (new =(0 (mix (syn a) (syn b))) (mul (abs a) (abs b)))
58 (new =(0 (mix (syn a) (syn b))) (mul (abs a) (abs b)))
98− ++ rem |=([a=@s b=@s] (dif a (pro b (fra a b))))
59+ ++ rem |=([a/@s b/@s] (dif a (pro b (fra a b))))
99− ++ sum |= [a=@s b=@s]
60+ ++ sum |= [a/@s b/@s]
100 ~| %si-sum
61 ~| %si-sum
101 =+ [c=(old a) d=(old b)]
62 =+ [c=(old a) d=(old b)]
102 ?: -.c
63 ?: -.c
@@ -110,10 +71,10 @@ shows, `|%` is also used to encapsulate arms that perform calculations.
110 (new | (sub +.c +.d))
71 (new | (sub +.c +.d))
111 (new & (sub +.d +.c))
72 (new & (sub +.d +.c))
112 (new | (add +.c +.d))
73 (new | (add +.c +.d))
113− ++ sun |=(a=@u (mul 2 a))
74+ ++ sun |=(a/@u (mul 2 a))
114− ++ syn |=(a=@s =(0 (end 0 1 a)))
75+ ++ syn |=(a/@s =(0 (end 0 1 a)))
115 --
76 --
116
77
117−[`++si`](), found in `hoon.hoon`, uses `|%` to create a core whose arms
78+`++si`, found in `hoon.hoon`, uses `|%` to create a core whose arms
118−contain functions used to calculate with signed integers, [`@s`](). In this
79+contain functions used to calculate with signed integers, `@s`. In this
119case our core is made up entirely of functions.
80case our core is made up entirely of functions.
docs/system/hoon/runes/br/brdt.md+6−25
@@ -2,34 +2,15 @@
2sort: 3
2sort: 3
3---
3---
4
4
5−`|. bardot`
5+# `:trap. |., "bardot", {$trap p/twig}`
6−===========
7
6
8−Trap: `|=` with no argument & not called automatically.
7+Trap: `|=` with no argument; expression not evaluated automatically.
9
8
10−Similar to `|=` except that it takes no arguments and is not automatically
9+Produces: a core with a single arm `$` that it takes no arguments and is not automatically
11called (you must activate it with the irregular wideform of `%-`, which is
10called (you must activate it with the irregular wideform of `%-`, which is
12−`()`. More specifically, its single arm [$]() (the empty name) is not automatically called when the [core]() is constructed. The core produced is both [dry] and [`%gold`](). Used to prevent thunk. XX
11+`()`).
13
12
14−Produces
13+Regular form: *1-fixed*
15−--------
16−
17−Twig: `[%brdt p=twig]`
18−
19−Accepts
20−-------
21−
22−`p` is a [`++twig`]().
23−
24−Tall form
25−---------
26−
27− |. p
28−
29−Wide form
30−---------
31−
32− |.(p)
33
14
34Examples
15Examples
35--------
16--------
@@ -68,7 +49,7 @@ Examples
68
49
69This is a simple example. We assign a shell variable `a` to be a trap
50This is a simple example. We assign a shell variable `a` to be a trap
70that simply produces the atom `42`. Printing `a` prints the core and its
51that simply produces the atom `42`. Printing `a` prints the core and its
71−context. Calling `a` using `(`, the irregular form of [`%-`](), produces
52+context. Calling `a` using `(`, the irregular form of `%-`, produces
72its value. As does pulling the arm `$` from inside it using `$:a`.
53its value. As does pulling the arm `$` from inside it using `$:a`.
73
54
74 /~zod/try=>
55 /~zod/try=>
docs/system/hoon/runes/br/brhp.md+5−25
@@ -2,35 +2,15 @@
2sort: 4
2sort: 4
3---
3---
4
4
5−`|- barhep`
5+# `:loop, |-, "barfas", {$trap p/twig}`
6−===========
7
6
8Trap: automatically called function with no arguments.
7Trap: automatically called function with no arguments.
9
8
10−A function with no arguments that's automatically called when constructed. More specifically, it produces a [dry]() [%gold]() [core]() whose single [arm]() [$]() (the empty name) is automatically called when the core is constructed. Similar to creating and calling an anonymous function and is quite commonly used for loops or recursion.
9+Produces: a core whose single arm $ (the empty name) is automatically called when the core is constructed. Similar to creating and calling an anonymous function and is quite commonly used for loops or recursion.
11
10
12−Produces
11+Regular form: *1-fixed*
13−--------
14
12
15−[`++twig`]: `[%brhp p=twig]`
13+Examples:
16−
17−Accepts
18−-------
19−
20−`p` is a twig
21−
22−Tall form
23−---------
24−
25− |- p
26−
27−Wide form
28−---------
29−
30− |-(p)
31−
32−Examples
33−--------
34
14
35 /~zod/try=> |-(42)
15 /~zod/try=> |-(42)
36 42
16 42
@@ -51,7 +31,7 @@ producing a nested tuple.
51
31
52 ++ dec :: decrement
32 ++ dec :: decrement
53 ~/ %dec
33 ~/ %dec
54− |= a=@
34+ |= a/@
55 ~| %decrement-underflow
35 ~| %decrement-underflow
56 ?< =(0 a)
36 ?< =(0 a)
57 =+ b=0
37 =+ b=0
docs/system/hoon/runes/br/brkt.md+12−32
@@ -2,36 +2,16 @@
2sort: 6
2sort: 6
3---
3---
4
4
5−`|^ barket`
5+# `:cork`, `|^`, "barket", `{$cork p/twig q/(map term foot)}`
6−===========
7
6
8−Same as `|-` except that it can contain internal arms.
7+Same as `|-` (expression evaluated automatically) except that it can contain internal arms.
9
8
10−`|^` is a synthetic rune that produces and then calls a [`%gold`]()
11−[book]() with sample `p` as a [`%$(p)`](), and a list of [arm]()s `q`.
9+Produces a `%gold` (XX elaborate on what gold, book mean?) book with sample `p` as a `%$(p)`, and a list of arms `q`.
12`q` must be closed with a `--`.
10`q` must be closed with a `--`.
13
11
14−Produces
12+Regular form: *1-fixed*
15−--------
16
13
17−Twig: `[%brkt p=twig q=(map term foot)]`
18−
19−Accepts
20−-------
21−
22−`p` is a [++twig](). `q` is a [`map`]() with [`++term`]() keys and
23−[`++foot`]() values, which are called arms.
24−
25−Tall form
26−---------
27−
28− |^ p
29− ++ p.n.q
30− q.n.q
31− --
32−
33−Examples
14+Examples:
34−--------
35
15
36 /~zod/try=> =+ a=21
16 /~zod/try=> =+ a=21
37 |^ [square double]
17 |^ [square double]
@@ -46,15 +26,15 @@ commonly used inside another gate or core.
46
26
47 ++ mum :: mug with murmur3
27 ++ mum :: mug with murmur3
48 ~/ %mum
28 ~/ %mum
49− |= a=*
29+ |= a/*
50 |^ (trim ?@(a a (mix $(a -.a) (mix 0x7fff.ffff $(a +.a)))))
30 |^ (trim ?@(a a (mix $(a -.a) (mix 0x7fff.ffff $(a +.a)))))
51 ++ spec :: standard murmur3
31 ++ spec :: standard murmur3
52− |= [syd=@ key=@]
32+ |= [syd/@ key/@]
53 ?> (lte (met 5 syd) 1)
33 ?> (lte (met 5 syd) 1)
54 =+ ^= row
34 =+ ^= row
55− |= [a=@ b=@]
35+ |= [a/@ b/@]
56 (con (end 5 1 (lsh 0 a b)) (rsh 0 (sub 32 a) b))
36 (con (end 5 1 (lsh 0 a b)) (rsh 0 (sub 32 a) b))
57− =+ mow=|=([a=@ b=@] (end 5 1 (mul a b)))
37+ =+ mow=|=([a/@ b/@] (end 5 1 (mul a b)))
58 =+ len=(met 5 key)
38 =+ len=(met 5 key)
59 =- =. goc (mix goc len)
39 =- =. goc (mix goc len)
60 =. goc (mix goc (rsh 4 1 goc))
40 =. goc (mix goc (rsh 4 1 goc))
@@ -63,7 +43,7 @@ commonly used inside another gate or core.
63 =. goc (mow goc 0xc2b2.ae35)
43 =. goc (mow goc 0xc2b2.ae35)
64 (mix goc (rsh 4 1 goc))
44 (mix goc (rsh 4 1 goc))
65 ^= goc
45 ^= goc
66− =+ [inx=0 goc=syd]
46+ =+ [inx/0 goc/syd]
67 |- ^- @
47 |- ^- @
68 ?: =(inx len) goc
48 ?: =(inx len) goc
69 =+ kop=(cut 5 [inx 1] key)
49 =+ kop=(cut 5 [inx 1] key)
@@ -76,7 +56,7 @@ commonly used inside another gate or core.
76 $(inx +(inx))
56 $(inx +(inx))
77 ::
57 ::
78 ++ trim :: 31-bit nonzero
58 ++ trim :: 31-bit nonzero
79− |= key=@
59+ |= key/@
80 =+ syd=0xcafe.babe
60 =+ syd=0xcafe.babe
81 |- ^- @
61 |- ^- @
82 =+ haz=(spec syd key)
62 =+ haz=(spec syd key)
@@ -85,5 +65,5 @@ commonly used inside another gate or core.
85 --
65 --
86 ::
66 ::
87
67
88−[`++mum`]() is a hashing gate, which uses two helper arms to compute
68+`++mum` is a hashing gate, which uses two helper arms to compute
89its results. The `|^` at the top performs the computation.
69its results. The `|^` at the top performs the computation.
docs/system/hoon/runes/br/brls.md+10−31
@@ -7,47 +7,26 @@ sort: 9
7
7
8Function with unreadable sample.
8Function with unreadable sample.
9
9
10−`|+` is a synthetic rune that produces a [dry]() [`%iron`]() function
10+Produces:a dry `%iron` gate with argument (aka sample) `$*(p)` and arms
11+`q`. Similar to `|=`, but differs in that its input (sample) cannot be
11−with argument (aka [sample]()) [`$*(p)`]() and [arm]()s `q`. `|+` is similar to `|=`, but differs in that its input (sample) cannot be read and thus cannot interfere with the type system.
12+read and thus cannot interfere with the type system.
12
13
13−Produces
14+Examples:
14−--------
15
15
16−Twig: `[%brls p=mold q=twig]`
17−
18−Accepts
19−-------
20−
21−`p` is a [mold](). `q` is a [`++twig`]().
22−
23−Tall form
24−---------
25−
26− |+ p
27− q
28−
29−Wide form
30−---------
31−
32− |+(p q)
33−
34−Examples
35−--------
36−
37− ~zod/try=> +<:|+(a=@ a)
16+ ~zod/try=> +<:|+(a/@ a)
38 ! -axis.6
17 ! -axis.6
39 ! peek-park
18 ! peek-park
40 ! exit
19 ! exit
41− ~zod/try=> +<:|=(a=@ a)
20+ ~zod/try=> +<:|=(a/@ a)
42 a=0
21 a=0
43
22
44−Here we're trying to read the sample, using the [head]() of the [tail]() of two different kinds of functions. With `|+` you can see we cause an error, whereas with `|=` our default sample is `a=0`.
23+Here we're trying to read the sample, using the head of the tail of two different kinds of functions. With `|+` you can see we cause an error, whereas with `|=` our default sample is `a=0`.
45
24
46− ~zod/try=> %.(20 |+(a=@ a))
25+ ~zod/try=> %.(20 |+(a/@ a))
47 20
26 20
48− ~zod/try=> %.(20 |=(a=@ a))
27+ ~zod/try=> %.(20 |=(a/@ a))
49 20
28 20
50− ~zod/try=> %.(20 |+(a=@ (add a 12)))
29+ ~zod/try=> %.(20 |+(a/@ (add a 12)))
51 32
30 32
52
31
53Kicking a `|+` gate, however, is the same as `|=`.
32Kicking a `|+` gate, however, is the same as `|=`.
docs/system/hoon/runes/br/brtr.md+10−32
@@ -2,42 +2,20 @@
2sort: 10
2sort: 10
3---
3---
4
4
5−`|* bartar`
5+# `:gill`, `|*`, "bartar", `{$gill p/twig q/twig}`
6−===========
7
6
8−Wet function.
7+Function with arguments; type checking at call time
9
8
10−Similar to `|=` except that it does type checking at
9+Produces: a gate with argument `p` and body `q`. Type checking happens at
11−call time, and that the product type is checked to be the same as
10+call time.
12−the input type (in other words it's [wet]()), rather than the input ([sample]()) [mold]().
13
11
14−Produces
12+Regular form: *1-fixed*, followed by Battery
15−--------
16
13
17−Twig: `[%brtr p=mold q=twig]`
14+Examples:
18
15
19−Accepts
20−-------
21−
22−`p` is a mold. `q` is a [++twig]().
23−
24−Tall form
25−---------
26−
27− |* p
28− q
29−
30−Wide form
31−---------
32−
33− |*(p q)
34−
35−Examples
36−--------
37−
38− ~zod/try=> %.('c' |*(a=@ a))
16+ ~zod/try=> %.('c' |*(a/@ a))
39 'c'
17 'c'
40− ~zod/try=> %.('c' |=(a=@ a))
18+ ~zod/try=> %.('c' |=(a/@ a))
41 99
19 99
42
20
43This is a concise way of understanding the difference between `|*` and
21This is a concise way of understanding the difference between `|*` and
@@ -48,7 +26,7 @@ input sample type.
48
26
49 ++ flop :: reverse
27 ++ flop :: reverse
50 ~/ %flop
28 ~/ %flop
51− |* a=(list)
29+ |* a/(list)
52 => .(a (homo a))
30 => .(a (homo a))
53 ^+ a
31 ^+ a
54 =+ b=`_a`~
32 =+ b=`_a`~
@@ -57,6 +35,6 @@ input sample type.
57 b
35 b
58 $(a t.a, b [i.a b])
36 $(a t.a, b [i.a b])
59
37
60−In [`++flop`](), `|*` is used so the type information within the passed
38+In `++flop`, `|*` is used so the type information within the passed
61in list is maintained. Without a `|*`, any cords would be cast to nouns
39in list is maintained. Without a `|*`, any cords would be cast to nouns
62as in our previous example.
40as in our previous example.
docs/system/hoon/runes/br/brts.md+6−35
@@ -2,45 +2,16 @@
2sort: 2
2sort: 2
3---
3---
4
4
5−`|= bartis`
5+# `:gate`, `|=`, "bartis", `{$gate p/twig q/twig}`
6−===========
7
6
8Function with argument(s).
7Function with argument(s).
9
8
10−`|=`, is a synthetic rune that produces a [dry]() [`%gold`]() gate with
11−sample [`$*(p)`](), arm `q`. A gate is a core with one arm, [`$`](), the
9+Produces: a dry `%gold` gate with sample `$*(p)`, arm `q`. A gate is a core with one arm, `$`, the
12−empty name. `|=` checks its input sample against its [mold](), `p`.
10+empty name.
13−
14−`|=` is similar to a function that takes a defined input and produces
15−the result of some computation. `|=` differs from `|*` in that its
16−typechecking occurs at compile-time to ensure that all inputs match its
17−sample mold.
18−
19−Produces
20−--------
21−
22−Twig: `[%brts p=mold q=twig]`
23−
24−Accepts
25−-------
26−
27−`p` is a mold. `q` is a twig.
28−
29−Tall form
30−---------
31−
32− |= p
33− q
34−
35−Wide form
36−---------
37−
38− |=(p q)
39
11
40Examples
12Examples
41−--------
42
13
43− ~zod/try=> =inc |=(a=@ +(a))
14+ ~zod/try=> =inc |=(a/@ +(a))
44 ~zod/try=> (inc 20)
15 ~zod/try=> (inc 20)
45 21
16 21
46
17
@@ -50,13 +21,13 @@ arguments.
50
21
51 ++ add :: add
22 ++ add :: add
52 ~/ %add
23 ~/ %add
53− |= [a=@ b=@]
24+ |= [a/@ b=@]
54 ^- @
25 ^- @
55 ?: =(0 a)
26 ?: =(0 a)
56 b
27 b
57 $(a (dec a), b +(b))
28 $(a (dec a), b +(b))
58
29
59−In [++add](), from `hoon.hoon`, `|=` creates a gate whose sample takes
30+In ++add, from `hoon.hoon`, `|=` creates a gate whose sample takes
60two atoms labeled `a` and `b`, and whose arm evaluates an expression
31two atoms labeled `a` and `b`, and whose arm evaluates an expression
61that produces the sum of the atoms by decrementing `a` until it is `0`
32that produces the sum of the atoms by decrementing `a` until it is `0`
62and incrementing `b` at each step. Here, `$` is used for recursion,
33and incrementing `b` at each step. Here, `$` is used for recursion,
docs/system/hoon/runes/br/brwt.md+23−45
@@ -2,51 +2,29 @@
2sort: 5
2sort: 5
3---
3---
4
4
5−`|? barwut`
5+# `:tray`, `|?`, "barwut", `{$tray p/twig}`
6−===========
7
6
8`|-` with hidden context.
7`|-` with hidden context.
9
8
10−Similar to `|-` except for that the [sample]() and
9+Produces: a lead trap with expression `p` whose context is hidden to avoid type conflicts.
11−[context]() of the core being passed is hidden in order to avoid
10+
12−type conflicts with a core that has a different [sample]() and
13−context. In urbit language, `|?` produces a [dry]() [%lead]() trap.
14−
15−Produces
16−--------
17−
18−Twig: `[%brwt q=twig]`
19−
20−Accepts
21−-------
22−
23−`p` is a [++twig]().
24−
25−Tall form
26−---------
27−
28− |? p
29−
30−Wide form
31−---------
32−
33− |?(p)
34−
35−Examples
11+Examples:
36−--------
12+
37−
38− ~zod/try=> |?(20)
13+ > |?(20)
39− < 1?lld
14+ < 1?aoy
40− [[[@da @ta] [@p @ta] *''] @n <250.yum 41.int 414.hhh 100.xkc 1.ypj %164>]
15+ { {a/^#3.?({i/@ud t/#3} ^#2.?({i/@ud t/#2} it(@ud))) our/@p now/@da eny/@uvI}
41− >
16+ $~
17+ <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>
18+ }
42− ~zod/try=> +:|?(20)
19+ > ~zod/try=> +:|?(20)
43− ! -axis.3
44− ! peek-park
45− ! exit
46− ~zod/try=> +:|.(20)
20+ > +:|.(20)
47− [ [[~2014.10.22..19.39.41..0440 ~.~2014.10.22..19.39.41..0440] [~zod ~.~zod] <||>]
21+ [ [ a=[i=1 t=[i=2 t=[i=3 t=~]]]
22+ our=~sivtyv-barnel
23+ now=~2016.3.29..04.14.18..9a26
24+ eny=0v16.dkepv.qm6er.7v2mh.kcdva.oisv9.th4dl.era7v.pj315.fd6la.76d34
25+ ]
48− ~
26+ ~
49− <250.yum 41.int 414.hhh 100.xkc 1.ypj %164>
27+ <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>
50− ]
28+ ]
51−
29+
52−A lead core's payload cannot be read or written.
30+As demonstrated above, a lead core's payload cannot be read or written.