rocinantealpha

reference / lists

find

The first item that passes a test, or an empty value.

ages = [ 12 17 21 30 ]first_adult = find ages [ it >= 18 ]print first_adult

It prints

21

How to write it

find list [ expression ]

Gives a value.

Related