make maxima function a functor