Implement a class that represents a continuous function.