Loading

FLATTEN


lists
Since v1.0.0
Available on all platforms
See also

The function FLATTEN inspects the top of the stack.

If it is a LIST of values, it inspects each value and replaces each value which was a LIST with its content. FLATTEN proceed recursively until all LISTs have been flattened.

If it is not a LIST, the function exits and let the stack in the same state.

Signature

Examples

[ 'a' 'b' 'c' ] [ 'd' 'e' [ 'f' 'g' ] ] 2 ->LIST FLATTEN [ [ { 'L1' [ 04 [ 04 05 ] ] } //this is not a list type. recursion stops here. ] ] FLATTEN