Be aware that as guest, programs you create could be edited or deleted by anyone. Register
Calculate a listlength
length([], 0).
length([H|T], N) :-
length(T, N1), N is N1+1.
length([a,b,c], N).
length([], N).