JanetDocsPlaygroundI'm feeling luckyGitHub sign in

flatten



    function
    boot.janet on line 1523, column 1

    (flatten xs)

    Takes a nested array (tree), and returns the depth first traversal 
    of that array. Returns a new array.


2 examplesSign in to add an example
Loading...
(def kvpairs [[:x 1] [:y 2]])

(table ;(flatten kvpairs)) # => @{:x 1 :y 2}
yumaikasPlayground
(flatten [1 [2 3 [4]] 5])  # => @[1 2 3 4 5]
cellularmitosisPlayground