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

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

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

Ways to use this method:


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