Search finds the first interval in the list that the supplied predicate returns true for. If no interval matches the predicate, it returns the length of the list.
(l List, t Predicate)
| 92 | // Search finds the first interval in the list that the supplied predicate returns |
| 93 | // true for. If no interval matches the predicate, it returns the length of the list. |
| 94 | func Search(l List, t Predicate) int { |
| 95 | return search(l, t) |
| 96 | } |