flat_map function:
Flat map a list into a new list using a function. If the first argument is a list, activate the second argument on each item, and if that returns a list, add all the items to a new list.
Examples:
- running:
(flat_map ["a,b,c", "d,e", 4, "g"], (split . ","))will give:["a", "b", "c", "d", "e", "g"]Because it will split each element by the comma, and return a list of all those lists.
- running:
(flat_map [1, 2, 3, 4], (.len))will give:[]
- running:
(flat_map {}, true)will return nothing