flatten

Flattens nested collections into 1 level. flatten can be applied on a list< T >, or set< T >.

Parameters:

No. Type Comments
1 list< T > or set< T > The object on which the flatten should be applied

Returns:

A map keyed by the results of the lambda and values as a list of element types. Usages: Where T can be a list or set.

  • flatten( v:list<T> ) : list< R >
  • flatten( v:set<T> ) : set< R >