alantech / alan

Autoscalable Programming Language
https://alan-lang.org
MIT License
305 stars 10 forks source link

Implement a variant of has that accepts a checking function #795

Closed dfellis closed 1 month ago

dfellis commented 1 month ago

While looking at the closely related find and index functions, I realized that there was some missing functionality with has (and index) -- the ability to provide a checking function instead of an exact match on the value, letting you use your own logic to decide if the array or buffer has what you want.