diff --git a/content/hoon/stdlib/1a.md b/content/hoon/stdlib/1a.md index b244fc7c..d009c324 100644 --- a/content/hoon/stdlib/1a.md +++ b/content/hoon/stdlib/1a.md @@ -217,6 +217,7 @@ A cell of `$atom`s. ```hoon ++ dvr + ~/ %dvr |: [a=`@`1 b=`@`1] ^- [p=@ q=@] ~_ leaf+"divide-by-zero" diff --git a/content/hoon/stdlib/2b.md b/content/hoon/stdlib/2b.md index aec71c3e..42b1ada3 100644 --- a/content/hoon/stdlib/2b.md +++ b/content/hoon/stdlib/2b.md @@ -1560,13 +1560,10 @@ A `+list`. ```hoon ++ welp ~/ %welp - =| [* *] - |@ - ++ $ - ?~ +<- - +<-(. +<+) - +<-(+ $(+<- +<->)) - -- + |* [* *] + ?~ +<- + +<-(. +<+) + +<-(+ $(+<- +<->)) ``` #### Examples @@ -1611,13 +1608,10 @@ A `+list`. ```hoon ++ zing ~/ %zing - =| * - |@ - ++ $ - ?~ +< - +< - (welp +<- $(+< +<+)) - -- + |* * + ?~ +< + +< + (welp +<- $(+< +<+)) ``` #### Examples diff --git a/content/hoon/stdlib/2e.md b/content/hoon/stdlib/2e.md index 7a7d9b6b..dc80446d 100644 --- a/content/hoon/stdlib/2e.md +++ b/content/hoon/stdlib/2e.md @@ -101,21 +101,19 @@ An atom. #### Source ```hoon -++ muk :: standard murmur3 - ~% %muk ..muk ~ - =+ ~(. fe 5) +++ muk + ~/ %muk |= [syd=@ len=@ key=@] + ^- @ + =+ ~(. fe 5) =. syd (end 5 syd) - =/ pad (sub len (met 3 key)) - =/ data (weld (rip 3 key) (reap pad 0)) - =/ nblocks (div len 4) :: intentionally off-by-one + =/ nblocks (div len 4) =/ h1 syd =+ [c1=0xcc9e.2d51 c2=0x1b87.3593] - =/ blocks (rip 5 key) =/ i nblocks =. h1 =/ hi h1 |- ?: =(0 i) hi - =/ k1 (snag (sub nblocks i) blocks) :: negative array index + =/ k1 (cut 5 [(sub nblocks i) 1] key) =. k1 (sit (mul k1 c1)) =. k1 (rol 0 15 k1) =. k1 (sit (mul k1 c2)) @@ -123,31 +121,31 @@ An atom. =. hi (rol 0 13 hi) =. hi (sum (sit (mul hi 5)) 0xe654.6b64) $(i (dec i)) - =/ tail (slag (mul 4 nblocks) data) + =/ tail (rsh [3 (mul 4 nblocks)] key) =/ k1 0 =/ tlen (dis len 3) =. h1 - ?+ tlen h1 :: fallthrough switch - %3 =. k1 (mix k1 (lsh [0 16] (snag 2 tail))) - =. k1 (mix k1 (lsh [0 8] (snag 1 tail))) - =. k1 (mix k1 (snag 0 tail)) + ?+ tlen h1 + %3 =. k1 (mix k1 (lsh [0 16] (cut 3 [2 1] tail))) + =. k1 (mix k1 (lsh [0 8] (cut 3 [1 1] tail))) + =. k1 (mix k1 (cut 3 [0 1] tail)) =. k1 (sit (mul k1 c1)) =. k1 (rol 0 15 k1) =. k1 (sit (mul k1 c2)) (mix h1 k1) - %2 =. k1 (mix k1 (lsh [0 8] (snag 1 tail))) - =. k1 (mix k1 (snag 0 tail)) + %2 =. k1 (mix k1 (lsh [0 8] (cut 3 [1 1] tail))) + =. k1 (mix k1 (cut 3 [0 1] tail)) =. k1 (sit (mul k1 c1)) =. k1 (rol 0 15 k1) =. k1 (sit (mul k1 c2)) (mix h1 k1) - %1 =. k1 (mix k1 (snag 0 tail)) + %1 =. k1 (mix k1 (cut 3 [0 1] tail)) =. k1 (sit (mul k1 c1)) =. k1 (rol 0 15 k1) =. k1 (sit (mul k1 c2)) (mix h1 k1) == - =. h1 (mix h1 len) + =. h1 (mix h1 (end 5 len)) |^ (fmix32 h1) ++ fmix32 |= h=@ diff --git a/content/hoon/stdlib/2h.md b/content/hoon/stdlib/2h.md index 4074e3e4..a2a170f9 100644 --- a/content/hoon/stdlib/2h.md +++ b/content/hoon/stdlib/2h.md @@ -530,22 +530,19 @@ A `+set`. ```hoon ++ int ~/ %int - =+ b=a - |@ - ++ $ - |- ^+ a - ?~ b - ~ - ?~ a - ~ - ?. (mor n.a n.b) - $(a b, b a) - ?: =(n.b n.a) - a(l $(a l.a, b l.b), r $(a r.a, b r.b)) - ?: (gor n.b n.a) - %- uni(a $(a l.a, r.b ~)) $(b r.b) - %- uni(a $(a r.a, l.b ~)) $(b l.b) - -- + |* b=_a + |- ^+ a + ?~ b + ~ + ?~ a + ~ + ?. (mor n.a n.b) + $(a b, b a) + ?: =(n.b n.a) + a(l $(a l.a, b l.b), r $(a r.a, b r.b)) + ?: (gor n.b n.a) + %- uni(a $(a l.a, r.b ~)) $(b r.b) + %- uni(a $(a r.a, l.b ~)) $(b l.b) ``` #### Examples @@ -767,25 +764,22 @@ A `+set`. ```hoon ++ uni ~/ %uni - =+ b=a - |@ - ++ $ - ?: =(a b) a - |- ^+ a - ?~ b - a - ?~ a - b - ?: =(n.b n.a) - b(l $(a l.a, b l.b), r $(a r.a, b r.b)) - ?: (mor n.a n.b) - ?: (gor n.b n.a) - $(l.a $(a l.a, r.b ~), b r.b) - $(r.a $(a r.a, l.b ~), b l.b) - ?: (gor n.a n.b) - $(l.b $(b l.b, r.a ~), a r.a) - $(r.b $(b r.b, l.a ~), a l.a) - -- + |* b=_a + ?: =(a b) a + |- ^+ a + ?~ b + a + ?~ a + b + ?: =(n.b n.a) + b(l $(a l.a, b l.b), r $(a r.a, b r.b)) + ?: (mor n.a n.b) + ?: (gor n.b n.a) + $(l.a $(a l.a, r.b ~), b r.b) + $(r.a $(a r.a, l.b ~), b l.b) + ?: (gor n.a n.b) + $(l.b $(b l.b, r.a ~), a r.a) + $(r.b $(b r.b, l.a ~), a l.a) ``` #### Examples @@ -828,7 +822,6 @@ An `$atom`. ~% %wyt + ~ |. ^- @ ?~(a 0 +((add $(a l.a) $(a r.a)))) --- ``` #### Examples diff --git a/content/hoon/stdlib/2i.md b/content/hoon/stdlib/2i.md index ab8f61d9..5723dc99 100644 --- a/content/hoon/stdlib/2i.md +++ b/content/hoon/stdlib/2i.md @@ -31,7 +31,6 @@ Container arm for `+map` operation arms. A `+map` is a `+set` of key-value pairs ++ by ~/ %by =| a=(tree (pair)) :: (map) - =* node ?>(?=(^ a) n.a) |@ ``` @@ -704,26 +703,23 @@ A `+map`. ```hoon ++ int ~/ %int - =+ b=a - |@ - ++ $ - |- ^+ a - ?~ b - ~ - ?~ a - ~ - ?: (mor p.n.a p.n.b) - ?: =(p.n.b p.n.a) - b(l $(a l.a, b l.b), r $(a r.a, b r.b)) - ?: (gor p.n.b p.n.a) - %- uni(a $(a l.a, r.b ~)) $(b r.b) - %- uni(a $(a r.a, l.b ~)) $(b l.b) - ?: =(p.n.a p.n.b) - b(l $(b l.b, a l.a), r $(b r.b, a r.a)) - ?: (gor p.n.a p.n.b) - %- uni(a $(b l.b, r.a ~)) $(a r.a) - %- uni(a $(b r.b, l.a ~)) $(a l.a) - -- + |* b=_a + |- ^+ a + ?~ b + ~ + ?~ a + ~ + ?: (mor p.n.a p.n.b) + ?: =(p.n.b p.n.a) + b(l $(a l.a, b l.b), r $(a r.a, b r.b)) + ?: (gor p.n.b p.n.a) + %- uni(a $(a l.a, r.b ~)) $(b r.b) + %- uni(a $(a r.a, l.b ~)) $(b l.b) + ?: =(p.n.a p.n.b) + b(l $(b l.b, a l.a), r $(b r.b, a r.a)) + ?: (gor p.n.a p.n.b) + %- uni(a $(b l.b, r.a ~)) $(a r.a) + %- uni(a $(b r.b, l.a ~)) $(a l.a) ``` #### Examples @@ -1179,24 +1175,21 @@ A `+map`. ```hoon ++ uni ~/ %uni - =+ b=a - |@ - ++ $ - |- ^+ a - ?~ b - a - ?~ a - b - ?: =(p.n.b p.n.a) - b(l $(a l.a, b l.b), r $(a r.a, b r.b)) - ?: (mor p.n.a p.n.b) - ?: (gor p.n.b p.n.a) - $(l.a $(a l.a, r.b ~), b r.b) - $(r.a $(a r.a, l.b ~), b l.b) - ?: (gor p.n.a p.n.b) - $(l.b $(b l.b, r.a ~), a r.a) - $(r.b $(b r.b, l.a ~), a l.a) - -- + |* b=_a + |- ^+ a + ?~ b + a + ?~ a + b + ?: =(p.n.b p.n.a) + b(l $(a l.a, b l.b), r $(a r.a, b r.b)) + ?: (mor p.n.a p.n.b) + ?: (gor p.n.b p.n.a) + $(l.a $(a l.a, r.b ~), b r.b) + $(r.a $(a r.a, l.b ~), b l.b) + ?: (gor p.n.a p.n.b) + $(l.b $(b l.b, r.a ~), a r.a) + $(r.b $(b r.b, l.a ~), a l.a) ``` #### Examples @@ -1240,27 +1233,24 @@ A `+map`. ```hoon ++ uno - =+ b=a - |@ - ++ $ - |= meg=$-([_p:node _q:node _q:node] _q:node) - |- ^+ a - ?~ b - a - ?~ a - b - ?: =(p.n.b p.n.a) - :+ [p.n.a (meg p.n.a q.n.a q.n.b)] - $(b l.b, a l.a) - $(b r.b, a r.a) - ?: (mor p.n.a p.n.b) - ?: (gor p.n.b p.n.a) - $(l.a $(a l.a, r.b ~), b r.b) - $(r.a $(a r.a, l.b ~), b l.b) - ?: (gor p.n.a p.n.b) - $(l.b $(b l.b, r.a ~), a r.a) - $(r.b $(b r.b, l.a ~), a l.a) - -- + |* b=_a + |* meg=$-([* * *] *) + |- ^+ a + ?~ b + a + ?~ a + b + ?: =(p.n.b p.n.a) + :+ [p.n.a `_?>(?=(^ a) q.n.a)`(meg p.n.a q.n.a q.n.b)] + $(b l.b, a l.a) + $(b r.b, a r.a) + ?: (mor p.n.a p.n.b) + ?: (gor p.n.b p.n.a) + $(l.a $(a l.a, r.b ~), b r.b) + $(r.a $(a r.a, l.b ~), b l.b) + ?: (gor p.n.a p.n.b) + $(l.b $(b l.b, r.a ~), a r.a) + $(r.b $(b r.b, l.a ~), a l.a) ``` #### Examples diff --git a/content/hoon/stdlib/2n.md b/content/hoon/stdlib/2n.md index 57f0e4b0..be68379a 100644 --- a/content/hoon/stdlib/2n.md +++ b/content/hoon/stdlib/2n.md @@ -103,10 +103,9 @@ This is the inverse of [`+cork`](#cork). ```hoon ++ corl |* [a=$-(* *) b=$-(* *)] - =< +:|.((a (b))) :: type check - =+ c=+<.b - |@ ++ $ (a (b c)) - -- + =< +:|.((a (b))) + |* c=_,.+<.b + (a (b c)) ``` #### Examples @@ -144,9 +143,8 @@ A gate. ```hoon ++ curr |* [a=$-(^ *) c=*] - =+ b=+<+.a - |@ ++ $ (a b c) - -- + |* b=_,.+<-.a + (a b c) ``` #### Examples @@ -184,9 +182,8 @@ A gate. ```hoon ++ cury |* [a=$-(^ *) b=*] - =+ c=+<+.a - |@ ++ $ (a b c) - -- + |* c=_,.+<+.a + (a b c) ``` #### Examples diff --git a/content/hoon/stdlib/3b.md b/content/hoon/stdlib/3b.md index ccd34b5c..b19d5f41 100644 --- a/content/hoon/stdlib/3b.md +++ b/content/hoon/stdlib/3b.md @@ -27,10 +27,10 @@ Produces either a float (`%f`), an infinity of other sign (`%i`), or not-a-numbe ```hoon ++ fn - $% [%f s=? e=@s a=@u] - [%i s=?] - [%n ~] - == + $% [%f s=? e=@s a=@u] + [%i s=?] + [%n ~] + == ``` #### Examples diff --git a/content/hoon/stdlib/3g.md b/content/hoon/stdlib/3g.md index 1dfe15b5..733159c7 100644 --- a/content/hoon/stdlib/3g.md +++ b/content/hoon/stdlib/3g.md @@ -361,9 +361,8 @@ Pull result out of a [`$edge`](#edge), or crash if there's no result. #### Source ```hoon -++ wonk =+ veq=$:edge - |@ ++ $ ?~(q.veq !! p.u.q.veq) - -- +++ wonk |* veq=_$:edge + ?~(q.veq !! p.u.q.veq) ``` #### Examples diff --git a/content/hoon/stdlib/4b.md b/content/hoon/stdlib/4b.md index d40c27d1..db7d30a9 100644 --- a/content/hoon/stdlib/4b.md +++ b/content/hoon/stdlib/4b.md @@ -772,8 +772,6 @@ A `$flag`. |= a=@ta |= b=@ ^- ? ?. =(%t (end 3 a)) - :: XX more and better sanity - :: & =+ [inx=0 len=(met 3 b)] ?: =(%tas a) @@ -797,12 +795,18 @@ A `$flag`. $(inx +(inx)) == |- ^- ? - ?: =(0 b) & - =+ cur=(end 3 b) + ?: =(inx len) & + =+ cur=(cut 3 [inx 1] b) ?: &((lth cur 32) !=(10 cur)) | - =+ len=(teff cur) - ?& |(=(1 len) =+(i=1 |-(|(=(i len) &((gte (cut 3 [i 1] b) 128) $(i +(i))))))) - $(b (rsh [3 len] b)) + =+ tef=(teff cur) + ?& ?| =(1 tef) + =+ i=1 + |- ^- ? + ?| =(i tef) + ?& (gte (cut 3 [(add i inx) 1] b) 128) + $(i +(i)) + == == == + $(inx (add inx tef)) == ``` diff --git a/content/hoon/stdlib/4e.md b/content/hoon/stdlib/4e.md index bdda7bd4..153b627d 100644 --- a/content/hoon/stdlib/4e.md +++ b/content/hoon/stdlib/4e.md @@ -38,22 +38,19 @@ A `$rule`. ```hoon ++ bend ~/ %bend - =+ raq=|*([a=* b=*] [~ u=[a b]]) - |@ - ++ $ - ~/ %fun - |* [vex=edge sab=rule] - ?~ q.vex - vex - =+ yit=(sab q.u.q.vex) - =+ yur=(last p.vex p.yit) - ?~ q.yit - [p=yur q=q.vex] - =+ vux=(raq p.u.q.vex p.u.q.yit) - ?~ vux - [p=yur q=q.vex] - [p=yur q=[~ u=[p=u.vux q=q.u.q.yit]]] - -- + |* raq=_|*([a=* b=*] [~ u=[a b]]) + ~/ %fun + |* [vex=edge sab=rule] + ?~ q.vex + vex + =+ yit=(sab q.u.q.vex) + =+ yur=(last p.vex p.yit) + ?~ q.yit + [p=yur q=q.vex] + =+ vux=(raq p.u.q.vex p.u.q.yit) + ?~ vux + [p=yur q=q.vex] + [p=yur q=[~ u=[p=u.vux q=q.u.q.yit]]] ``` #### Examples @@ -114,20 +111,17 @@ A `$rule`. ```hoon ++ comp ~/ %comp - =+ raq=|*([a=* b=*] [a b]) - |@ - ++ $ - ~/ %fun - |* [vex=edge sab=rule] - ~! +< - ?~ q.vex - vex - =+ yit=(sab q.u.q.vex) - =+ yur=(last p.vex p.yit) - ?~ q.yit - [p=yur q=q.yit] - [p=yur q=[~ u=[p=(raq p.u.q.vex p.u.q.yit) q=q.u.q.yit]]] - -- + |* raq=_|*([a=* b=*] [a b]) + ~/ %fun + |* [vex=edge sab=rule] + ~! +< + ?~ q.vex + vex + =+ yit=(sab q.u.q.vex) + =+ yur=(last p.vex p.yit) + ?~ q.yit + [p=yur q=q.yit] + [p=yur q=[~ u=[p=(raq p.u.q.vex p.u.q.yit) q=q.u.q.yit]]] ``` #### Examples diff --git a/content/hoon/stdlib/4f.md b/content/hoon/stdlib/4f.md index 240e49d4..4fe86e1b 100644 --- a/content/hoon/stdlib/4f.md +++ b/content/hoon/stdlib/4f.md @@ -399,16 +399,13 @@ A `$rule`. ```hoon ++ here ~/ %here - =+ [hez=|=([a=pint b=*] [a b]) sef=*rule] - |@ - ++ $ - ~/ %fun - |= tub=nail - =+ vex=(sef tub) - ?~ q.vex - vex - [p=p.vex q=[~ u=[p=(hez [p.tub p.q.u.q.vex] p.u.q.vex) q=q.u.q.vex]]] - -- + |* [hez=_|=([a=pint b=*] [a b]) sef=rule] + ~/ %fun + |= tub=nail + =+ vex=(sef tub) + ?~ q.vex + vex + [p=p.vex q=[~ u=[p=(hez [p.tub p.q.u.q.vex] p.u.q.vex) q=q.u.q.vex]]] ``` #### Examples @@ -655,12 +652,10 @@ A `$rule`. ```hoon ++ knee - =| [gar=* sef=_|.(*rule)] - |@ ++ $ - |= tub=nail - ^- (like _gar) - ((sef) tub) - -- + |* [gar=* sef=_|.(*rule)] + |= tub=nail + ^- (like _gar) + ((sef) tub) ``` #### Examples diff --git a/content/hoon/stdlib/4i.md b/content/hoon/stdlib/4i.md index e8e6a4f8..7c4dc31f 100644 --- a/content/hoon/stdlib/4i.md +++ b/content/hoon/stdlib/4i.md @@ -990,10 +990,10 @@ Parse single-soq cord with `\{gap}/` anywhere in the middle, or triple-single qu ;~ less soz (ifix [soq soq] (boss 256 (more gon qit))) == - =+ hed=;~(pose ;~(plug (plus ace) vul) (just '\0a')) - %- iny %+ ifix - :- ;~(plug soz hed) - ;~(plug (just '\0a') soz) + %+ iny + =+ vul=;~(plug col col (star prn)) + :- ;~(plug soz ;~(pose ;~(plug (plus ace) vul) (easy ~))) + soz (boss 256 (star qat)) == == @@ -1174,7 +1174,7 @@ Parse comments and produce a null. Note that a comment must be ended with a newl ++ vul %+ cold ~ ;~ plug col col (star prn) - (just `@`10) + ;~(pose (just `@`10) (full (easy ~))) == ``` diff --git a/content/hoon/stdlib/4j.md b/content/hoon/stdlib/4j.md index bfcc2616..55929ca6 100644 --- a/content/hoon/stdlib/4j.md +++ b/content/hoon/stdlib/4j.md @@ -1181,7 +1181,7 @@ A `$rule`. #### Source ```hoon -++ ape |*(fel=rule ;~(pose (cold 0 (just '0')) fel)) +++ ape |*(fel=rule ;~(pose (cold `@`0 (just '0')) fel)) ``` #### Examples @@ -1548,6 +1548,7 @@ Parse a numerical month (1-12). (just '1') (cook |=(a=@ (add 10 (sub a '0'))) (shim '0' '2')) == + dub sed:ab == ``` diff --git a/content/hoon/stdlib/4l.md b/content/hoon/stdlib/4l.md index 442bc18a..afc47957 100644 --- a/content/hoon/stdlib/4l.md +++ b/content/hoon/stdlib/4l.md @@ -595,8 +595,8 @@ Parsing `$rule`. Parse a `@da`-formatted date string (sans the leading `~`) to a %+ cook |=([a=@ b=?] [b a]) ;~(plug dim:ag ;~(pose (cold | hep) (easy &))) - ;~(pfix dot mot:ag) :: month - ;~(pfix dot dip:ag) :: day + ;~(pfix dot mot:ag) + ;~(pfix dot dap:ag) ;~ pose ;~ pfix ;~(plug dot dot) diff --git a/content/hoon/stdlib/5a.md b/content/hoon/stdlib/5a.md index 53756c0b..33ba5eb5 100644 --- a/content/hoon/stdlib/5a.md +++ b/content/hoon/stdlib/5a.md @@ -34,7 +34,9 @@ Make loobean. #### Source ```hoon -++ bool `type`(fork [%atom %f `0] [%atom %f `1] ~) +++ bool + ^- type + (fork [%atom %f `%.y] [%atom %f `%.n] ~) ``` --- @@ -188,11 +190,10 @@ Combine two formulas. ~/ %cond |= [pex=nock yom=nock woq=nock] ^- nock - ?- pex - [%1 %0] yom - [%1 %1] woq - * [%6 pex yom woq] - == + ?: =([%1 &] pex) yom + ?: =([%1 |] pex) woq + ?: =([%0 0] pex) pex + [%6 pex yom woq] ``` --- @@ -245,10 +246,10 @@ Aura compatibility. =(0 p.wux) &(!=(0 p.wux) (lte p.wux p.yoz)) == - |- ?| =(%$ p.yoz) - =(%$ p.wux) - ?& =((end 3 p.yoz) (end 3 p.wux)) - $(p.yoz (rsh 3 p.yoz), p.wux (rsh 3 p.wux)) + |- ?| =(%$ q.yoz) + =(%$ q.wux) + ?& =((end 3 q.yoz) (end 3 q.wux)) + $(q.yoz (rsh 3 q.yoz), q.wux (rsh 3 q.wux)) == == == @@ -267,19 +268,18 @@ Loobean `&`. ~/ %flan |= [bos=nock nif=nock] ^- nock - ?: =(bos nif) bos - ?: =([%0 0] bos) nif - ?: =([%0 0] nif) bos - ?- bos - [%1 %1] bos - [%1 %0] nif - * - ?- nif - [%1 %1] nif - [%1 %0] bos - * [%6 bos nif [%1 1]] - == - == + ?: ?| =(bos nif) + =([%1 |] bos) + =([%1 &] nif) + =([%0 0] bos) + == + bos + ?: ?| =([%1 &] bos) + =([%1 |] nif) + =([%0 0] nif) + == + nif + [%6 bos nif [%1 |]] ``` --- @@ -311,19 +311,18 @@ Loobean `|`. ~/ %flor |= [bos=nock nif=nock] ^- nock - ?: =(bos nif) bos - ?: =([%0 0] bos) nif - ?: =([%0 0] nif) bos - ?- bos - [%1 %1] nif - [%1 %0] bos - * - ?- nif - [%1 %1] bos - [%1 %0] nif - * [%6 bos [%1 0] nif] - == - == + ?: ?| =(bos nif) + =([%1 &] bos) + =([%1 |] nif) + =([%0 0] bos) + == + bos + ?: ?| =([%1 |] bos) + =([%1 &] nif) + =([%0 0] nif) + == + nif + [%6 bos [%1 &] nif] ``` --- @@ -484,25 +483,21 @@ Compiler utility. |- ^- (unit [p=axis q=hoon]) ?- dom ~ ~ - :: [* ~ ~] - %+ bind (look cog q.q.n.dom) + %+ bind (look cog q.n.dom) |=((pair axis hoon) [(peg axe p) q]) - :: [* ~ *] - =+ yep=(look cog q.q.n.dom) + =+ yep=(look cog q.n.dom) ?^ yep [~ (peg (peg axe 2) p.u.yep) q.u.yep] $(axe (peg axe 3), dom r.dom) - :: [* * ~] - =+ yep=(look cog q.q.n.dom) + =+ yep=(look cog q.n.dom) ?^ yep [~ (peg (peg axe 2) p.u.yep) q.u.yep] $(axe (peg axe 3), dom l.dom) - :: [* * *] - =+ yep=(look cog q.q.n.dom) + =+ yep=(look cog q.n.dom) ?^ yep [~ (peg (peg axe 2) p.u.yep) q.u.yep] =+ pey=$(axe (peg axe 6), dom l.dom) diff --git a/content/hoon/stdlib/5c.md b/content/hoon/stdlib/5c.md index b9906da4..b4d1c066 100644 --- a/content/hoon/stdlib/5c.md +++ b/content/hoon/stdlib/5c.md @@ -593,13 +593,12 @@ A `(unit vase)`. ```hoon ++ slew - |= [axe=@ vax=vase] ^- (unit vase) - ?. |- ^- ? - ?: =(1 axe) & - ?. ?=(^ q.vax) | - $(axe (mas axe), q.vax .*(q.vax [0 (cap axe)])) - ~ - `[(~(peek ut p.vax) %free axe) .*(q.vax [0 axe])] + |= [axe=@ vax=vase] + =/ typ |. (~(peek ut p.vax) %free axe) + |- ^- (unit vase) + ?: =(1 axe) `[$:typ q.vax] + ?@ q.vax ~ + $(axe (mas axe), q.vax ?-((cap axe) %2 -.q.vax, %3 +.q.vax)) ``` #### Examples @@ -707,7 +706,7 @@ Superficial arm. [%core *] |- ^- ? ?~ q.r.q.typ | - ?| (~(has by q.q.n.q.r.q.typ) cog) + ?| (~(has by q.n.q.r.q.typ) cog) $(q.r.q.typ l.q.r.q.typ) $(q.r.q.typ r.q.r.q.typ) == @@ -743,7 +742,7 @@ A `(list term)`. %- zing %+ turn ~(tap by q.r.q.typ) |= [* b=tome] - %+ turn ~(tap by q.b) + %+ turn ~(tap by b) |= [a=term *] a ==