mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 20:02:51 +03:00
44 lines
768 B
Plaintext
44 lines
768 B
Plaintext
!:
|
|
:: /=main=/bin/ram/hoon
|
|
::
|
|
=> .(- `[who=@p how=path]`-)
|
|
|= *
|
|
|= ape=(list path)
|
|
=+ ^= maw ^- (list slip)
|
|
:~ [~ %$ %noun]
|
|
==
|
|
:- ~ :- ~
|
|
:- maw
|
|
|= [now=@da pax=path nut=note]
|
|
^- bowl
|
|
?+ -.nut [~ ~ maw ..$]
|
|
%$
|
|
?~ p.nut [~ ~]
|
|
=| giv=(list gift)
|
|
|- ^- bowl
|
|
?: |(?=(~ ape) ?=(~ q.u.p.nut))
|
|
[giv ~ maw ..^$]
|
|
=+ pax=i.ape
|
|
?> ?=([@ @ @ *] pax)
|
|
?> &(=(i.pax (scot %p who)) =(i.t.t.pax (scot %da now)))
|
|
%= $
|
|
ape t.ape
|
|
giv
|
|
:_ giv
|
|
^- gift
|
|
:+ %ok i.t.pax
|
|
^- nori
|
|
:- %&
|
|
^- soba
|
|
:_ ~
|
|
:- t.t.t.pax
|
|
^- miso
|
|
=+ lon=((hard arch) .^(%cy pax))
|
|
?~ q.lon
|
|
=+ fil=(file pax)
|
|
?~ fil
|
|
[%ins i.q.u.p.nut]
|
|
[%mut %a %a u.fil i.q.u.p.nut]
|
|
==
|
|
==
|