shrub/pkg/arvo/lib/ford-same.hoon
2024-03-20 13:05:02 -04:00

60 lines
1004 B
Plaintext

/- neo
=>
|%
++ card card:neo
++ get-src
|= =bowl:neo
^- (unit vase)
=+ !<([cac=(unit vase) *] q:(~(got by deps.bowl) %src))
cac
+$ state [cache=(unit vase) ~]
+$ poke [%dep ~]
--
^- firm:neo
|%
+$ poke ^poke
+$ state ^state
++ kids ~
++ deps
=< apex
|%
++ apex
%- ~(gas by *deps:neo)
:~ src/src
==
++ src
[%& %x ,[cache=(unit vase) *] ,*]
--
++ form
^- form:neo
|_ [=bowl:neo case=@ud state-vase=vase *]
+* sta !<(^state state-vase)
++ call
|= [old-state=vase act=*]
*(list card)
++ reduce
|= pok=*
^- vase
=+ ;;(poke=^poke pok)
=/ sta sta
=. cache.sta (get-src bowl)
!>(sta)
++ init
|= vax=(unit vase)
!>(*^state)
++ born
=- ~[-]
[were.bowl %poke %dep ~]
++ echo
|= [=pith val=*]
*(list card:neo)
++ take
|= =sign:neo
^- (list card:neo)
?. ?=([%neo %conf %val @] sign)
!!
=- ~[-]
[were.bowl %poke %dep ~]
--
--