From 47ae7b23286a674aeacec9cbb8519325a6eda5e9 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Tue, 16 Jul 2019 09:53:48 -0700 Subject: [PATCH] More readable genrec. Explicit quoting is slightly more overhead but worth it I think to show what's going on more clearly. --- thun/thun.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/thun/thun.pl b/thun/thun.pl index a2ab4cb..d9cecd0 100644 --- a/thun/thun.pl +++ b/thun/thun.pl @@ -191,7 +191,8 @@ combo(times, [_, N|S], S, _, _ ) :- N #< 0, fail. combo(genrec, [R1, R0, Then, If|S], [ Else, Then, If|S], E, [ifte|E]) :- - append(R0, [[If, Then, R0, R1, genrec]|R1], Else). + Quoted = [If, Then, R0, R1, genrec], + append(R0, [Quoted|R1], Else). /*