Name

find — Searches for the first occurence of a certain element in a list

Synopsis

any find ( any VAR ,
  list LIST ,
  block EXPR );
 

Parameters

any VAR

list LIST

block EXPR

Return

any

Returns nil, if nothing is found.

Description

Searches for a certain item in the list. It applies the expression EXPR to each element in the list and returns the first element the makes the expression evaluate to true, if VAR is bound to that element.

Usage

  find (integer n, [3,5,6,4], ``(n >= 5)) -> 5