Last active 1759283371

capitalex's Avatar capitalex revised this gist 1759283371. Go to revision

1 file changed, 24 insertions

update.min(file created)

@@ -0,0 +1,24 @@
1 + (symbol update
2 + (quot|dict :structure quot :path quot :operation ==> quot|dict :updated) (
3 + path first :index
4 + (
5 + ((path size 1 == structure "quot" type? and) (
6 + structure structure index get operation -> index set @updated
7 + ))
8 +
9 + ((path size 1 == structure "dict" type? and) (
10 + structure structure index dict.get operation -> index dict.set @updated
11 + ))
12 +
13 + ((structure "quot" type?) (
14 + structure index get path rest operation update :value
15 + structure value index set @updated
16 + ))
17 +
18 + ((structure "dict" type?) (
19 + structure index dict.get path rest operation update :value
20 + structure value index dict.set @updated
21 + ))
22 + ) case
23 + )
24 + ) ::
Newer Older