• R/O
  • SSH

Joypy: Commit

Main interpreter and library.


Commit MetaInfo

Revisionc0d8947614211e4d4220d4ccba326b3ded24b467 (tree)
Time2019-07-21 09:36:58
AuthorSimon Forman <sforman@hush...>
CommiterSimon Forman

Log Message

Fold try_both_branches/4 into branch combo.

Change Summary

Incremental Difference

diff -r fa294f364037 -r c0d894761421 thun/thun.pl
--- a/thun/thun.pl Sat Jul 20 17:32:03 2019 -0700
+++ b/thun/thun.pl Sat Jul 20 17:36:58 2019 -0700
@@ -208,10 +208,10 @@
208208 combo(branch, [T, _, true|S], S, Ei, Eo) :- !, append(T, Ei, Eo).
209209 combo(branch, [_, F, false|S], S, Ei, Eo) :- !, append(F, Ei, Eo).
210210 combo(branch, [T, F, Expr|S], S, Ei, Eo) :-
211- catch(
211+ catch( % Try Expr and do one or the other,
212212 (Expr -> append(T, Ei, Eo) ; append(F, Ei, Eo)),
213- _,
214- try_both_branches(T, F, Ei, Eo) % in case of error.
213+ _, % If Expr don't grok, try both branches.
214+ (append(T, Ei, Eo) ; append(F, Ei, Eo))
215215 ).
216216
217217
@@ -233,10 +233,6 @@
233233 append(R0, [Quoted|R1], Else).
234234
235235
236-try_both_branches(T, _, Ei, Eo) :- append(T, Ei, Eo).
237-try_both_branches(_, F, Ei, Eo) :- append(F, Ei, Eo).
238-
239-
240236 /*
241237 Compiler
242238 */
Show on old repository browser