moved some things from Term to HO (currying/lambda calculus)