find.fl: Return the first object in a list that fulfills a predicate

Description Usage Arguments Value See Also

Description

A predicate function is one that takes a single argument returns either true or false. find takes such a function, applies it to a functional list, and returns the first object where the function returns TRUE.

Usage

1
2
## S3 method for class 'fl'
find(ls, fn, ...)

Arguments

ls

A function, with class fl, that operates as a functional list object

fn

A predicate function, as described above

...

Additional arguments to remove, for S3 consistency

Value

Either the first object that fulfills the predicate or FALSE.

See Also

funprog


michaelquinn32/lambdaList documentation built on May 22, 2019, 9:52 p.m.