Skip to content

flatMap

flatMap(items) => a

ParameterTypeDescription
itemsIterable

Returns

(Generator) A list of flattened values where the closure has been called on each value.

Example

elk
["abc", "def"] | flatMap => x: x  #=> ["a", "b", "c", "d", "e", "f"]
["abc", "def"] | flatMap => x: x  #=> ["a", "b", "c", "d", "e", "f"]