improve between_/3 implementation
@@ -16,14 +16,14 @@ between(Lower, Upper, X) :-
between_(Lower, Upper, X)
).
-between_(Lower, Lower, Lower) :- !.
between_(Lower, Upper, Lower1) :-
- ( Lower < Upper,
+ Lower < Upper,
+ !,
( Lower1 = Lower
; Lower0 is Lower + 1,
between_(Lower0, Upper, Lower1)
- )
).
+between_(Lower, Lower, Lower).
enumerate_nats(I, I).
enumerate_nats(I0, N) :-
