loop returns the last argument, not false
This commit is contained in:
parent
1a449a536e
commit
73d2d68cff
|
@ -151,7 +151,7 @@ _loop args@(TupleV [fn@(FnV _ _), arg]) = do
|
||||||
v <- apply fn arg
|
v <- apply fn arg
|
||||||
if v /= BoolV False then
|
if v /= BoolV False then
|
||||||
_loop $ TupleV [fn, v]
|
_loop $ TupleV [fn, v]
|
||||||
else return v
|
else return arg
|
||||||
|
|
||||||
initialState = ([stdout, stdin],
|
initialState = ([stdout, stdin],
|
||||||
[M.fromList [("id", FnV emptyEnv [(VarP "x", Var "x")]),
|
[M.fromList [("id", FnV emptyEnv [(VarP "x", Var "x")]),
|
||||||
|
|
Loading…
Reference in New Issue