shrub/pkg/arvo/gen/desk-jam.hoon
2021-09-21 19:13:54 -04:00

27 lines
529 B
Plaintext

:: +desk-jam: jam ankh from desk
::
=, clay
=>
|%
++ ankh-to-map
=| res=(map path page)
=| pax=path
|= a=ankh
^- (map path page)
=? res ?=(^ fil.a) (~(put by res) pax [p q.q]:q.u.fil.a)
=/ dir=(list [seg=@ta =ankh]) ~(tap by dir.a)
|- ^+ res
?~ dir res
$(dir t.dir, res ^$(pax (snoc pax seg.i.dir), a ankh.i.dir))
--
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[=desk ~]
~
==
:- %jam
%- jam
%- ankh-to-map
=< ank
.^(dome:clay %cv /(scot %p p.bec)/[desk]/(scot %da now))