[polyml] multiple type parameters in a functor