JanetDocsPlaygroundI'm feeling luckyGitHub sign in

merge



    function
    boot.janet on line 1531, column 1

    (merge & colls)

    Merges multiple tables/structs into one new table. If a key appears 
    in more than one collection in `colls`, then later values replace 
    any previous ones. Returns the new table.


2 examplesSign in to add an example
Loading...
(merge {:a 1 :b 2})

#=> @{:a 1 :b 2} 
# good way to convert struct to table
pepePlayground
(merge {:a 1 :b 2} 
       {:c 3 :a 4})
# -> @{:c 3 :a 4 :b 2}
KrasjetPlayground