+help %solid

This commit is contained in:
Anton Dyudin 2016-10-21 17:59:51 -07:00
parent b67f5b46a0
commit e993076eed

View File

@ -30,6 +30,14 @@
?. =(':: ' (end 3 4 i.c)) ?. =(':: ' (end 3 4 i.c))
"<undocumented>" "<undocumented>"
(trip i.c) (trip i.c)
::
++ read-at
|= {len/@u pax/path}
|= {nam/@t ark/arch} ^- (unit {@t path})
?. (~(has by dir.ark) %hoon) ~
%+ bind (file (welp pax /[nam]/hoon))
|= a/* ^- {cord path}
[;;(@t a) (welp (slag len pax) /[nam])]
-- --
:: ::
:- %say :- %say
@ -37,21 +45,20 @@
=/ pax/path /(scot %p our)/home/(scot %da now)/gen :: XX hardcoded =/ pax/path /(scot %p our)/home/(scot %da now)/gen :: XX hardcoded
=+ len=(lent pax) =+ len=(lent pax)
=. pax ?~(typ pax (welp pax /[p.typ])) =. pax ?~(typ pax (welp pax /[p.typ]))
:- %tang %- flop :- %tang %- flop ^- tang
=+ ark=.^(arch cy+pax) =+ ark=.^(arch cy+pax)
%+ welp
?~ typ ~
=/ red ((read-at len (scag len pax)) p.typ ark) :: XX ugly
(drop (bind red rend))
|- ^- tang |- ^- tang
=+ =< arl=(~(tap by (~(urn by dir.ark) .))) =+ =< arl=(~(tap by (~(urn by dir.ark) .)))
|=({a/@t $~} .^(arch cy+(welp pax /[a]))) |=({a/@t $~} .^(arch cy+(welp pax /[a])))
=- %+ welp - %+ welp
%- zing ^- (list tang) =/ dir/(list {@ path})
%+ turn (sort arl aor) (murn arl (read-at len pax))
|= {a/@t b/arch} `tang`(turn (sort dir aor) rend)
^$(pax (welp pax /[a]), ark b) %- zing ^- (list tang)
=; res/(list {cord path}) %+ turn (sort arl aor)
(turn (sort res aor) rend)
%+ murn arl
|= {a/@t b/arch} |= {a/@t b/arch}
?. (~(has by dir.b) %hoon) ~ ^$(pax (welp pax /[a]), ark b)
%+ bind (file (welp pax /[a]/hoon))
|= c/* ^- {cord path}
[;;(@t c) (welp (slag len pax) /[a])]