next | previous | forward | backward | up | top | index | toc | home

deepSplice -- remove subsequences

Description

deepSplice v -- yields a new list v where any members of v which are sequences are replaced by their elements, and so on.

Works also for sequences, and leaves other expressions unchanged. Copying the list v is always done when v is mutable.

i1 : deepSplice { (a,b,(c,d,(e,f))), g, h }

o1 = {a, b, c, d, e, f, g, h}

o1 : List

See also