The flatten Library FunctionThe flatten function converts a list of lists to a list that is the concatenation of all internal lists. If the input list contains any items that are not a list, flatten will fail. Implementationdefine flatten : (list -> list)
{ nil [cat] foldl }Usage>> ((1, 2), (3, 4)) flatten
stack: (1, 2, 3, 4) See Also
|