Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » lists and sequences » select » select(BasicList,Type)
next | previous | forward | backward | up | index | toc

select(BasicList,Type) -- select elements of a given type in a list

Description

The order of the elements in the result will be the same as in the original list L, and the class of the result will be the same as the class of L.

i1 : select({1,"2",3.14,4+5*ii}, ZZ)

o1 = {1}

o1 : List
i2 : select([1,"2",3.14,4+5*ii], RR)

o2 = [3.14]

o2 : Array

See also

Ways to use this method:


The source of this document is in Macaulay2Doc/functions/select-doc.m2:113:0.