diff --git a/src/Evaluator.hs b/src/Evaluator.hs index 8eb7ab7..668cbe6 100644 --- a/src/Evaluator.hs +++ b/src/Evaluator.hs @@ -15,8 +15,8 @@ base = M.fromList [ eval :: Env -> Expr -> (Env, Expr) eval env (IntE x) = (env, IntE x) -eval env (VarE v) = (env, env M.! v) -eval env (SetE v expr) = (M.insert v expr env, NilE) +eval env (VarE v) = eval env $ env M.! v +eval env (SetE v expr) = (M.insert v expr env, expr) eval env NilE = (env, NilE) --apply :: Proc -> Args -> Expr