From: Markus Triska Date: Tue, 28 Apr 2020 15:52:29 +0000 (+0200) Subject: use new nth0/3 from library(lists) X-Git-Tag: v0.8.123~100^2^2~2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=4ea0dee90a1a6d5979f3f79e629a1c0e7462417d;p=scryer-prolog.git use new nth0/3 from library(lists) --- diff --git a/src/prolog/lib/clpz.pl b/src/prolog/lib/clpz.pl index f9a4a91f..ebfbc547 100644 --- a/src/prolog/lib/clpz.pl +++ b/src/prolog/lib/clpz.pl @@ -6917,12 +6917,6 @@ contribution_at(T, Task, Offset-Bs, Contribution) :- ?(Contribution) #= B*C ). -nth0(0, [E|_], E) :- !. -nth0(N, [_|Ls], E) :- - N > 0, - N1 is N - 1, - nth0(N1, Ls, E). - nth1(I, Es, E) :- I0 is I-1, nth0(I0, Es, E).