Atom - F - Flatten List

Characters: F

Tags: array

Arity: monadic

This atom is monadic, which means it takes one argument.

Functionality

Flatten a list.

Details

A flat list is a list such that every element is a single value (i.e. not a list itself). A way to think about it formally (as a recursive definition) is that a single value will be wrapped into a singleton list, and a list will have each element flattened and all elements concatenated together. Elements appear in the order of depth-first traversal.

Synonyms

This atom should work roughly the same way as or very similarly in concept to the following code snippets (some edge case exceptions may exist):