urbit/gen/hood/merge.hoon
2015-09-11 17:24:51 -07:00

34 lines
851 B
Plaintext

::
:::: /hoon/merge/hood/gen
::
/? 314
!:
|%
++ beaky ,[span span span ~]
++ sorc ?([bek=beaky ~] [her=@p sud=@tas ~])
--
::
::::
!:
:- %say
|= $: [now=@da eny=@uvI bek=beak]
[arg=[?(sorc [syd=$|(desk beaky) sorc])] gem=?(%auto germ)]
==
=* our p.bek
|^ :- %kiln-merge
^- [syd=desk her=ship sud=desk gem=?(%auto germ)]
?- arg
[@ @ ~] =+(arg [sud ?.(=(our her) her (sein her)) sud gem])
[^ ~] =+((pars bek.arg) [dez ?.(=(our who) who (sein who)) dez gem])
[* @ @ ~] [(pars-src syd.arg) =+(arg [her sud gem])]
[* ^ ~] [(pars-src syd.arg) =+((pars bek.arg) [who dez gem])]
==
++ pars |=(a=beaky =+((need (tome a)) `[who=ship dez=desk]`[p q]))
++ pars-src
|= syd=$|(desk beaky)
?@ syd syd
=+ (pars syd)
~| [%into-foreign who `path`syd]
?>(=(our who) dez)
--