hoon: adds hints for likely-to-be-jetted list/treap/parser arms
(weld (scag b a) [c (slag b a)])
::
++ welp :: faceless weld
+ ~/ %welp
=| {* *}
|@
++ $
--
::
++ zing :: promote
+ ~/ %zing
=| *
|@
++ $
?|((b n.a) $(a l.a) $(a r.a))
::
++ apt :: check correctness
+ =< $
+ ~/ %apt
=| {l/(unit) r/(unit)}
- |- ^- ?
+ |. ^- ?
?~ a &
?& ?~(l & (gor n.a u.l))
?~(r & (gor u.r n.a))
c(l a(r l.c))
::
++ rep :: reduce to product
+ ~/ %rep
|* b/_=>(~ |=({* *} +<+))
|-
?~ a +<+.b
$(a r.a, c (peg c 7))
::
++ apt :: check correctness
+ =< $
+ ~/ %apt
=| {l/(unit) r/(unit)}
- |- ^- ?
+ |. ^- ?
?~ a &
?& ?~(l & &((gor p.n.a u.l) !=(p.n.a u.l)))
?~(r & &((gor u.r p.n.a) !=(u.r p.n.a)))
d(l a(r l.d))
::
++ rep :: reduce to product
+ ~/ %rep
|* b/_=>(~ |=({* *} +<+))
|-
?~ a +<+.b
[-.f a(l +.e, r +.f)]
::
++ run :: apply gate to values
+ ~/ %run
|* b/gate
|-
?~ a a
::
::
++ urn :: apply gate to nodes
+ ~/ %urn
|* b/$-({* *} *)
|-
?~ a ~
a(n n.a(q (b p.n.a q.n.a)), l $(a l.a), r $(a r.a))
::
++ wyt :: depth of map
- |- ^- @
+ =< $
+ ~% %wyt + ~
+ |. ^- @
?~(a 0 +((add $(a l.a) $(a r.a))))
::
++ key :: set of keys
+ =< $
+ ~/ %key
=+ b=`(set _?>(?=(^ a) p.n.a))`~
- |- ^+ b
+ |. ^+ b
?~ a b
$(a r.a, b $(a l.a, b (~(put in b) p.n.a)))
::
[(last p.vex p.wag) [~ (raq p.u.q.vex p.u.q.wag) q.u.q.wag]]
::
++ stun :: parse several times
+ ~/ %stun
|* {lig/{@ @} fel/rule}
|= tub/nail
^- (like (list _(wonk (fel))))
