mirror of
https://github.com/urbit/shrub.git
synced 2024-12-22 02:11:38 +03:00
graph: rewrite +tap-deep to function properly
This commit is contained in:
parent
63dc2f4c36
commit
19005f3ca3
@ -105,7 +105,9 @@
|
|||||||
^- (list [index:store node:store])
|
^- (list [index:store node:store])
|
||||||
?: ?=(%empty -.children.node)
|
?: ?=(%empty -.children.node)
|
||||||
~
|
~
|
||||||
(turn (tap-deep:gra p.children.node) empty-children)
|
%+ turn
|
||||||
|
(tap-deep:gra index p.children.node)
|
||||||
|
empty-children
|
||||||
::
|
::
|
||||||
++ empty-children
|
++ empty-children
|
||||||
|= [=index:store =node:store]
|
|= [=index:store =node:store]
|
||||||
|
@ -104,27 +104,19 @@
|
|||||||
resources.q.update
|
resources.q.update
|
||||||
::
|
::
|
||||||
++ tap-deep
|
++ tap-deep
|
||||||
|= =graph:store
|
|= [=index:store =graph:store]
|
||||||
^- (list [index:store node:store])
|
^- (list [index:store node:store])
|
||||||
=| =index:store
|
%+ roll (tap:orm:store graph)
|
||||||
=/ nodes=(list [atom node:store])
|
|= $: [=atom =node:store]
|
||||||
(tap:orm:store graph)
|
lis=(list [index:store node:store])
|
||||||
|- =* tap-nodes $
|
==
|
||||||
^- (list [index:store node:store])
|
=/ child-index (snoc index atom)
|
||||||
%- zing
|
=/ childless-node node(children [%empty ~])
|
||||||
%+ turn
|
?: ?=(%empty -.children.node)
|
||||||
nodes
|
(snoc lis [child-index childless-node])
|
||||||
|= [=atom =node:store]
|
%+ weld
|
||||||
^- (list [index:store node:store])
|
(snoc lis [child-index childless-node])
|
||||||
%+ welp
|
(tap-deep child-index p.children.node)
|
||||||
^- (list [index:store node:store])
|
|
||||||
[(snoc index atom) node]~
|
|
||||||
?. ?=(%graph -.children.node)
|
|
||||||
~
|
|
||||||
%_ tap-nodes
|
|
||||||
index (snoc index atom)
|
|
||||||
nodes (tap:orm:store p.children.node)
|
|
||||||
==
|
|
||||||
::
|
::
|
||||||
++ get-mark
|
++ get-mark
|
||||||
|= res=resource
|
|= res=resource
|
||||||
|
Loading…
Reference in New Issue
Block a user