std-flatten


Synopsis

(std-flatten <lst>)

Description

STD-FLATTEN converts a list with possible sublists (a "tree") into a flat list. The new list contains no sublist.

The AutoLISP versions so far has stack problems with too large lists. It is defined highly recursive.

Example

(std-flatten '((0 1 2)(3 4 (5))(6 7 8)(9))  
=> (0 1 2 3 4 5 6 8 9)

Arguments

lst: any proper list.

Return Value

A list.

Side Effects

None.

It may throw an stack overflow error if the recursion stack is exhausted. In plain AutoLISP this may be a maximal lisp length of about 240, dependent of the version.

Module

(std-require 'STDLIST)

Defined in STDLIST

#- SMALL