
select - selects operands

Calling sequence:

select(expr, func)
select(expr, func, expr_1 ...)

Parameter:
expr     --  list, set or expression
func     --  function
expr_1   --  expression

Summary:

select applies the function func to all operands of expr. Only those operands
of expr, for which the call returns TRUE, remain in the returned object. expr
has to be a list, set or expression. Note that if the first argument expr is an
expression sequence, than this sequence is not flattend.

With the call of func, the expressions expr_1 ...  are used as additional
parameters. The call of func has the form

    func(opd, expr_1 ...)

for each operand opd of the expression expr. The function call has to return
either TRUE or FALSE. If FALSE is returned then the relevant operand is
removed. select is a kernel function.

>>  select({ {a,x,b}, {a}, {x,1} }, contains, x);

      {{x, 1}, {a, x, b}}

>>  select([sin(x), x^2, y, 11], has, x);

      [sin(x), x^2]

>>  select(sin(x) + x^2 + y + 11, has, x);

      sin(x) + x^2

See also:  map

