cfunction
src/core/array.c on line 250 , column 1
(array/concat arr & parts )
Concatenates `parts` , a variable number of arrays and tuples , into
the first argument `arr` which must be an array. If any of `parts`
are arrays or tuples , their values are inserted into `arr` .
Otherwise , each value in `parts` will be appended to `arr` in
order. Returns `arr` .
# Flatten single level of nested collections
(def foo [ [[1 2 ] [3 4 ]]
[[5 6 ] [7 8 ]] ])
(apply array/concat @[] foo ) # => @[(1 2) (3 4) (5 6) (7 8)]
(def a @[1 2 ])
(def b @[1 2 ])
(= a b ) # => false
(def a @[1 2 ])
(def b (array/concat a 3 ))
a # => @[1 2 3]
b # => @[1 2 3]
(= a b ) # => true
(def a @[1 2 ])
(array/concat a 3 [4 5 ] @[6 7 ] [] @[] 8 )
a # => @[1 2 3 4 5 6 7 8]