Concatenates an array of arrays and/or single elements into a single array
This may seem redundant with a one-level flatten, but concat has a much less complex type since it doesn't have to account for deeper nesting.
flatten
concat
import * as A from "flurp/array";A.concat([[3], [6], [9, 12]]); // [3, 6, 9, 12]A.concat([[3], 6, [9, 12]]); // [3, 6, 9, 12]
Concatenates an array of arrays and/or single elements into a single array
Remarks
This may seem redundant with a one-level
flatten
, butconcat
has a much less complex type since it doesn't have to account for deeper nesting.Example