a higher order command line calculator