progress towards generating function code. Need to figure out typing to
finish.