contents.gifindex.gifprev1.gifnext1.gif

flatten

Format: flatten( a )

Arguments: [any] a Hierarchical list or matrix

Returns: [any] Input list flattened to one level

Description: In DScript you can specify lists that contain sublists as elements. This is the way you specify a 2-dimensional matrix, for example. The flatten primitive combines all sublists to create a single, flat list. If the list already contains only one dimension, it is not altered.

Examples: flatten([[1,2],[3,4]]) = [1,2,3,4]

flatten([1,2,3,4]) = [1,2,3,4]

See Also: List Literal, group

  Forecasting Software  |  Strategic Planning Software  |  Decision Support
Decision Analysis  |  Monte Carlo Simulations  |  Risk Analysis
Portfolio Management Software  |  Expert Systems  |  Website Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2008 Vanguard Software Corporation
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
Vanguard
Applying science to business management
Vanguard
Print this page   Email this page to a friend