A C++ implementation of lisp style function mapping.