Macaulay2 » Documentation
Packages » Macaulay2Doc :: select(BasicList,Function)
next | previous | forward | backward | up | index | toc

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

Ways to use this method: