Determining the length of a list.
Source: PROLOG str. 52 Wydawnictwo PLJ Warszawa 1991 ISBN 83-85190-63-5
Program source code: list_length.pl
dlugosc([], 0). dlugosc([G|O], N) :- dlugosc(O, N1), N is N1 + 1.