Skip to content

Commit

Permalink
ENHANCED: Performance of nth1/3 and nth0/3 for mode (-,+,?)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanWielemaker committed Sep 4, 2023
1 parent 5310dab commit b1ad4aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/lists.pl
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@

nth_gen(_, Elem, Elem, Base, Base).
nth_gen([H|Tail], Elem, _, N, Base) :-
succ(N, M),
M is N + 1,
nth_gen(Tail, Elem, H, M, Base).


Expand Down

0 comments on commit b1ad4aa

Please sign in to comment.