JanetDocsPlaygroundI'm feeling luckyGitHub sign in

merge-into



    function
    boot.janet on line 1409, column 1

    (merge-into tab & colls)

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


1 exampleSign in to add an example
Loading...
(let [tbl @{:a 1}]
  (merge-into tbl {:b 2})
  tbl)
# => @{:a 1 :b 2}

# real-world example: https://git.sr.ht/~subsetpark/bagatto/tree/19aea03fe23fe5486890912df7dc4a936ce617a3/item/main.janet#L23
sogaiuPlayground