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_adultIt prints
21
How to write it
find list [ expression ]Gives a value.
reference / lists
findThe first item that passes a test, or an empty value.
ages = [ 12 17 21 30 ]first_adult = find ages [ it >= 18 ]print first_adultIt prints
21
find list [ expression ]Gives a value.