I'm trying to write a class that takes, as a constructor parameter, a factory function that creates another instance of the same class on a transformed version of the input. For a trivial example, a functor class that takes an int, prints it, and returns another functor that prints the input's successor.I'm trying to write a class that takes, as a co