contra-find
Using contra, asynchronously find a value in a collection that matches a condition.
var λ = ;var find = ; var items = 1 2 2 3 3 4 4 5 5 6; ;
output
item : [ 1, 2 ]
check: [ 1, 2 ]
item : [ 2, 3 ]
check: [ 2, 3 ]
item : [ 3, 4 ]
check: [ 3, 4 ]
item found! [ 3, 4 ]
Notice that it iterates in series and stops as soon as the item is found.
License
MIT