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

all(BasicList,Function) -- whether all elements of a list satisfy a specified condition

Synopsis

Description

i1 : all({1,2,3,4}, even)

o1 = false
i2 : all({2,4,6,8}, even)

o2 = true
i3 : all{true,true,true}

o3 = true
i4 : all{true,true,false}

o4 = false
i5 : all{}

o5 = true
i6 : all(7, x -> x < 10)

o6 = true

See also

Ways to use this method: