try/bin/[[def 'Unacceptably slow arm define'] [poxo '|>(xmlt | - "")']]

This commit is contained in:
Anton Dyudin 2014-08-15 14:43:04 -07:00 committed by Anton Dyudin
parent 74e325fb77
commit ed99b34f29
2 changed files with 43 additions and 0 deletions

39
try/bin/def.hoon Normal file
View File

@ -0,0 +1,39 @@
!:
:: Define ::
=> |%
++ isin |= [a=tape b=tape]
?. (gte (lent a) (lent b)) |
?: =(b (scag (lent b) a)) &
$(a +.a)
::
++ range |= [[a=tape b=tape] c=wain]
^- wain
?~ c ~
?. (isin (trip i.c) a) $(c t.c)
:- i.c => .(c t.c)
|- ^- wain
?~ c ~
?: (isin (trip i.c) b) ~
[i.c $(c t.c)]
::
++ vanes
%- turn :_ |=([a=@t ~] a)
(~(tap by r:;;(arch .^(cy//=arvo=))))
--
|= ^
|= [a=@tas ~]
=- ~[te/-]~
%- zing
%+ turn vanes |= b=@t
=- ?~ - ~
[(cat 3 '%' b) -]
%+ range ["++ {(trip a)}" "++"]
=- (lore ;;(,@ .^(cx//=arvo=/[b]/hoon)))
'''
++ by
my
stuff
++ron
as
'''

4
try/bin/poxo.hoon Normal file
View File

@ -0,0 +1,4 @@
|= ^
|= [a=manx ~]
=- ~[$/!>(-)]~
(xmlt | a "")