From: Markus Triska Date: Fri, 11 Aug 2023 21:41:54 +0000 (+0200) Subject: reorder tests, per https://github.com/mthom/scryer-prolog/pull/1961#pullrequestreview... X-Git-Tag: v0.9.2~10^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=4a6bf5fd5fdb6d101dd019bfda30d72328c994a3;p=scryer-prolog.git reorder tests, per https://github.com/mthom/scryer-prolog/pull/1961#pullrequestreview-1574380588 --- diff --git a/src/lib/iso_ext.pl b/src/lib/iso_ext.pl index deccb345..0a5798ae 100644 --- a/src/lib/iso_ext.pl +++ b/src/lib/iso_ext.pl @@ -121,11 +121,11 @@ bb_get(Key, Value) :- succ(I, S) :- can_be(not_less_than_zero, I), can_be(not_less_than_zero, S), - ( integer(I) -> - S is I+1 - ; integer(S) -> + ( integer(S) -> S > 0, I is S-1 + ; integer(I) -> + S is I+1 ; instantiation_error(succ/2) ).