A generic bisection class for any function
The built-in Python bisect library works on a list. We can reload the __getitem__ method of an object to mimic the behaviour of a list so it can be used for bisect module off the shelf.
Input: a function that returns True for all n<=n0 (n0 is unknown...
hash.hupili.net4 min read