implementation of eager functional semantics (CPS)