JanetDocsPlaygroundI'm feeling luckyGitHub sign in

merge



    function
    boot.janet on line 1413, column 1

    (merge & colls)

    Merges multiple tables/structs to one. If a key appears in more 
    than one collection, then later values replace any previous ones. 
    Returns a 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