- Index
- »
- axon
- »
- func:flatten
def
func:flatten
flatten(list)
Flatten a list to a single level. If given a list of grids, then flatten rows to a single grid. Also see List.flatten
and Etc.gridFlatten
.
Examples:
// flatten a list of numbers [1, [2, 3], [4, [5, 6]]].flatten >> [1, 2, 3, 4, 5, 6] // flatten a list of grids ["Carytown", "Gaithersburg"].map(n=>readAll(siteRef->dis==n)).flatten