ListTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Tables, lists, and sets : ListTools Package : ListTools/Collect

ListTools

  

Collect

  

interspace the elements of a list with an object

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Collect( L )

Parameters

L

-

list

Description

• 

The Collect( L ) function produces a list of pairs [ expr, f ] from the input list L, for which expr is an expression occurring in L and f is the (positive) integral number of occurrences of expr in L.

• 

Note that the order of the output is session dependent, and is therefore not defined.

Examples

withListTools:

Collect

(1)

Collect3

3,1

(2)

Collect2,2,3,2,4,2,3,5,4

2,4,3,2,4,2,5,1

(3)

Compatibility

• 

The ListTools[Collect] command was introduced in Maple 2017.

• 

For more information on Maple 2017 changes, see Updates in Maple 2017.

See Also

ListTools

member

numboccur