From 916bd92bcb31dd820068083e791ccc9d32e2b0ee Mon Sep 17 00:00:00 2001 From: pingu Date: Tue, 25 Nov 2025 21:48:57 +0100 Subject: [PATCH] Now works, just had to be lazy in the lookup --- 3or4/Interpreter/Self.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/3or4/Interpreter/Self.hs b/3or4/Interpreter/Self.hs index ac94d07..c504161 100644 --- a/3or4/Interpreter/Self.hs +++ b/3or4/Interpreter/Self.hs @@ -69,7 +69,11 @@ lookupExp = "\\c. rec lookup = \\xs. case xs of \ \ { Cons(b,bs) -> \ \ case b of \ - \ { Branch(c', xs, e') -> if (equal c c') Pair(xs,e') (lookup bs) } \ + \ { Branch(c', xs, e') -> case (equal c c') of \ + \ { True() -> Pair(xs,e') \ + \ ; False() -> lookup bs \ + \ } \ + \ } \ \ }" substsExp :: Exp