Page 1 of 1

How to implement "subst" and "subst_exp" functions in haskell?

Posted: Sat May 14, 2022 3:24 pm
by answerhappygod
How to implement "subst" and "subst_exp" functions in
haskell?
How To Implement Subst And Subst Exp Functions In Haskell 1
How To Implement Subst And Subst Exp Functions In Haskell 1 (51.44 KiB) Viewed 53 times
79 substVars :: [Var] => [Var] -> Base -> Base 80 81 substVars vs' vs phi : = foldi ((flip.uncurry) subst) phi (zip vs' vs) 82 83 subst phi y x = phi[y/x] 84 subst :: Exp -> Var -> Base -> Base 85 86 87 subst yxf = error "TODO" 88 89 90 91 subst_exp :: Exp -> Var -> Exp -> Exp 92 subst_exp el x e2 = error "TODO: FILL THIS IN" רח