diff --git a/pl/sort.yap b/pl/sort.yap index d4e9607f3..91eee683e 100644 --- a/pl/sort.yap +++ b/pl/sort.yap @@ -37,9 +37,9 @@ length(L,M) :- '$$_length2'(M,L). -> L = [] ; - L = [_|L1], N > 0, N1 is N - 1, + L = [_|L1], '$$_length2'(N1, L1) ).