If I comment out the WTF handler...
...then the branch combinator works as intended. (Although the constraint-based stuff was also cool, it would have captured information from the comparison.) ?- joy(`[32 >] [++] [--] ifte`, Si, So). Si = [_6598|_6600], So = [_6598+1|_6600] ; Si = [_6598|_6600], So = [_6598-1|_6600] ; false. ?- sjc(hmm, `[32 >] [++] [--] ifte`). func(hmm, [A|B], [A+1|B]). true ; func(hmm, [A|B], [A-1|B]). true ; false.
This commit is contained in:
parent
714bf2cab6
commit
2a66e7fb47
|
|
@ -88,7 +88,7 @@ thun( [Func|E], Si, So) :- func(Func, Si, S), thun(E, S, So).
|
|||
thun([Combo|E], Si, So) :- combo(Combo, Si, S, E, Eo), thun(Eo, S, So).
|
||||
|
||||
% Some error handling.
|
||||
thun([Unknown|E], Si, So) :- write("wtf? "), writeln(Unknown), So = [[Unknown|E]|Si].
|
||||
% thun([Unknown|E], Si, So) :- write("wtf? "), writeln(Unknown), So = [[Unknown|E]|Si].
|
||||
|
||||
/*
|
||||
Literals
|
||||
|
|
|
|||
Loading…
Reference in New Issue