next | previous | forward | backward | up | top | index | toc | home
Macaulay2 > The Macaulay2 language > lists and sequences > select(BasicList,Function)

select(BasicList,Function) -- select elements from a list

Synopsis

Description

The order of the elements in the result will be the same as in the original list v, and the class of the result will be the same as the class of v.
i1 : select({1,2,3,4,5}, odd)

o1 = {1, 3, 5}

o1 : List
i2 : select([1,2,3,4,5], odd)

o2 = [1, 3, 5]

o2 : Array

See also