]> Repositorios git - scryer-prolog.git/commitdiff
use new nth0/3 from library(lists)
authorMarkus Triska <[email protected]>
Tue, 28 Apr 2020 15:52:29 +0000 (17:52 +0200)
committerMarkus Triska <[email protected]>
Tue, 28 Apr 2020 15:59:49 +0000 (17:59 +0200)
src/prolog/lib/clpz.pl

index f9a4a91f701b01d94465528084a0b03d79e4f45f..ebfbc54703aebe50b80ab81c1bfa41f721d8fc4d 100644 (file)
@@ -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).