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

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

Synopsis

Description

i1 : any((1,2,3,4),(2,3,4,5), (i,j) -> i>j)

o1 = false
i2 : any((1,2,5,4),(2,3,4,5), (i,j) -> i>j)

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

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

o4 = true

See also