forked from dan/liminix
support multi-arg assoc
This commit is contained in:
parent
a9ddd78482
commit
79445fd962
@ -1,6 +1,8 @@
|
|||||||
(fn assoc [tbl k v]
|
(fn assoc [tbl k v & more]
|
||||||
(tset tbl k v)
|
(tset tbl k v)
|
||||||
tbl)
|
(case more
|
||||||
|
[k v] (assoc tbl k v)
|
||||||
|
_ tbl))
|
||||||
|
|
||||||
(fn merge [table1 table2]
|
(fn merge [table1 table2]
|
||||||
(collect [k v (pairs table2) &into table1]
|
(collect [k v (pairs table2) &into table1]
|
||||||
|
Loading…
Reference in New Issue
Block a user