making type-eval and type-apply