Updated codegen.ml

Fixed some bugs. It supports arithmathic operations for derivation of
functions now, e.g. h($x) = f + g’(x).