nasa / bplib

Apache License 2.0
30 stars 13 forks source link

Implement generic list search function #96

Closed jphickey closed 2 years ago

jphickey commented 2 years ago

It is a commonly needed task to iterate over a list in order to find a particular item of interest. The code to do this could be implemented as a generic function where the caller provides a "match" routine to determine if the entry matches the one being searched for. Currently, this is implemented by iterating over the list, but code would read better and be simpler if this were consolidated into a function.