gall,lull: don't include $case in %grow

This commit is contained in:
~wicrum-wicrun 2023-03-29 13:53:25 +02:00
parent 165ad4c2f7
commit d77d1ce615
2 changed files with 9 additions and 31 deletions

View File

@ -1884,7 +1884,7 @@
[%arvo note-arvo]
[%pyre =tang]
::
[%grow =case =spur =noun]
[%grow =spur =noun]
[%tomb =case =spur]
[%cull =case =spur]
==

View File

@ -957,38 +957,16 @@
:: +ap-grow: bind a path in the agent's scry namespace
::
++ ap-grow
|= [=case =spur =noun]
|= [=spur =noun]
^+ ap-core
=- ap-core(sky.yoke -)
=/ yon ?>(?=(%ud -.case) p.case)
=/ old (~(get by sky.yoke) spur)
?~ old :: insert binding at new path
%+ ~(put by sky.yoke) spur
`(put:on-path fan:*path-state yon [%& noun])
=> ?~ bob.u.old
.
~| gall-grow-bob+[path actual=yon max=u.bob.u.old]
?> (gth yon u.bob.u.old) :: enforce high water mark
.
=/ val (get:on-path fan.u.old yon)
?~ val :: insert binding at new case
=> ?~ lat=(ram:on-path fan.u.old) .
?> (gte yon key.u.lat)
.
%+ ~(put by sky.yoke) spur
u.old(fan (put:on-path fan.u.old yon [%& noun]))
?- -.u.val
%& :: re-bind same value
~| gall-grow-dupe+[agent-name case spur]
?> =(p.u.val noun)
sky.yoke
::
%| :: reinflate tombstone
~| gall-grow-hash+[agent-name case spur p.u.val]
?> =(p.u.val (shax (jam noun)))
%+ ~(put by sky.yoke) spur
u.old(fan (put:on-path fan.u.old yon [%& noun]))
==
%+ ~(put by sky.yoke) spur
?~ old=(~(get by sky.yoke) spur) :: insert binding at new path
`(put:on-path fan:*path-state 0 [%& noun])
=- u.old(fan (put:on-path fan.u.old - [%& noun]))
?~ lat=(clap bob.u.old (bind (ram:on-path fan.u.old) head) max)
0
+(u.lat)
:: +ap-tomb: tombstone -- replace bound value with hash
::
++ ap-tomb