let
[minfp.git] / int.icl
diff --git a/int.icl b/int.icl
index 78f2c1f..3b82750 100644 (file)
--- a/int.icl
+++ b/int.icl
@@ -31,8 +31,8 @@ preamble =
        ]
 
 sub :: [Char] Expression Expression -> Expression
-sub ident subst (Let v b rest)
-       = Let v a (if (isMember ident a) b (sub ident subst b))
+sub ident subst (Let v b rest)
+       = Let v (sub ident subst b)
                (if (v == ident) rest (sub ident subst rest))
 sub ident subst (Var v)
        | ident == v = subst
@@ -46,8 +46,8 @@ printer (Func 0 args body) = eval (body args) >>= printer
 printer a = pure a
 
 eval :: Expression -> Eval Value
-eval (Let ident as body rest)
-       =   modify (\vs->[(ident, Func (length as) [] \e->zipSt sub as e body):vs])
+eval (Let ident body rest)
+       =   modify (\vs->[(ident, Func 0 [] \_->body):vs])
        >>| eval rest
 eval (Lit v) = pure v
 eval (Var v) = gets (lookup v) >>= maybe (err (toString v +++ " not found")) pure