Hacker News new | past | comments | ask | show | jobs | submit login

> The only case where it returns (None, None) are those when it detects non-monotonicity in your predicate (returning false when a lower input returned true). So if you know your predicate is monotonic, feel free to hit this case with a panic!("should never happen").

Empty range?




No such thing, the range is inclusive of the l and r endpoints.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: