next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: all(BasicList,BasicList,Function)

all(BasicList,BasicList,Function) -- whether all corresponding elements of a pair of lists satisfy a condition

Synopsis

Description

i1 : all((1,2,3,4),(2,3,4,5), (i,j) -> i<=j)

o1 = true
i2 : all((1,2,5,4),(2,3,4,5), (i,j) -> i<=j)

o2 = false
i3 : all((1,2,5,4),(2,3,4,5), x -> (print x; false))
(1, 2)

o3 = false
i4 : all((1,2,5,4),(2,3,4,5), x -> (print x; true))
(1, 2)
(2, 3)
(5, 4)
(4, 5)

o4 = true

See also