position: Return the position of the first object in a list that...

Description Usage Arguments Details Value See Also

Description

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

Usage

1
position(ls, fn, start = 0)

Arguments

ls

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

fn

A predicate function, as described above

start

A index of the list to begin the search (remember, cardinal numbers)

Details

Remember, in this package we use cardinal numbers, counting from 0.

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.