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

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



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: