JanetDocsPlaygroundI'm feeling luckyGitHub sign in

mapcat



    function
    boot.janet on line 927, column 1

    (mapcat f ind)

    Map a function over every element in an array or tuple and use array
    to concatenate the results.


1 exampleSign in to add an example
Loading...
# Convert an array of k/v pairs into a table

(def kvp @[[:foo 1] [:bar 2]])
(table ;(mapcat identity kvp))  # => @{:foo 1 :bar 2}
MikeBellerPlayground