• R/O
  • SSH

Joypy: Commit

Main interpreter and library.


Commit MetaInfo

Revision029a7b8c618a856982427b21c8f4622077769cc9 (tree)
Time2019-07-21 11:34:56
AuthorSimon Forman <sforman@hush...>
CommiterSimon Forman

Log Message

Remove cuts from branch combinator.

Change Summary

Incremental Difference

diff -r f2d71c5ad139 -r 029a7b8c618a thun/thun.pl
--- a/thun/thun.pl Sat Jul 20 19:26:11 2019 -0700
+++ b/thun/thun.pl Sat Jul 20 19:34:56 2019 -0700
@@ -214,9 +214,10 @@
214214
215215 combo(dupdip, [P, X|S], [X|S], Ei, Eo) :- append(P, [X|Ei], Eo).
216216
217-combo(branch, [T, _, true|S], S, Ei, Eo) :- !, append(T, Ei, Eo).
218-combo(branch, [_, F, false|S], S, Ei, Eo) :- !, append(F, Ei, Eo).
217+combo(branch, [T, _, true|S], S, Ei, Eo) :- append(T, Ei, Eo).
218+combo(branch, [_, F, false|S], S, Ei, Eo) :- append(F, Ei, Eo).
219219 combo(branch, [T, F, Expr|S], S, Ei, Eo) :-
220+ \+ Expr = true, \+ Expr = false,
220221 catch( % Try Expr and do one or the other,
221222 (Expr -> append(T, Ei, Eo) ; append(F, Ei, Eo)),
222223 _, % If Expr don't grok, try both branches.
Show on old repository browser