next
|
previous
|
forward
|
backward
|
up
|
top
|
index
|
toc
|
home
Macaulay2
>
The Macaulay2 language
>
lists and sequences
>
any(BasicList,Function)
any(BasicList,Function) -- whether any elements of a list satisfy a specified condition
Synopsis
Usage:
any(L,f)
Function:
any
Inputs:
L
,
a
basic list
f
,
a
function
, which returns true or false
Outputs:
a
Boolean value
,
true
if
f
returns true when applied to any element of
L
and
false
otherwise
Description
i1 : any({1,2,3,4}, even) o1 = true
i2 : any({1,3,5,7}, even) o2 = false
See also
scan
-- apply a function to each element
apply
-- apply a function to each element
select
-- select from a list, hash table, or string
any
-- whether any elements satisfy a specified condition
member
-- test membership in a list or set