Previous Up Next

2.37.21  Select the elements of a list : select

select takes as arguments : a boolean function f and a list L.
select selects in the list L, the elements c such that f(c)==true.
Input :

select(x->(x>=2),[0,1,2,3,1,5])

Output :

[2,3,5]

Previous Up Next