make length steadfast (from Ulrich Neumerkel).

This commit is contained in:
Vitor Santos Costa 2009-05-15 20:54:14 -05:00
parent 7953004610
commit 8cfd6cf7fc

View File

@ -37,9 +37,9 @@ length(L,M) :- '$$_length2'(M,L).
->
L = []
;
L = [_|L1],
N > 0,
N1 is N - 1,
L = [_|L1],
'$$_length2'(N1, L1)
).