transform :: Exp -> State ... Exp transform x = case x of ... ConstInt i -> do k<-fresh; return $ Abs k (app (Ref k) x)
type Cont = Exp -> State ... Exp
transform
:: Exp -> ( Cont -> State ... Exp )
transform x k = case x of ...
ConstInt i -> k x