4 lines
96 B
Prolog
4 lines
96 B
Prolog
mean(List, Mean) :-
|
|
length(List, Length),
|
|
sumlist(List, Sum),
|
|
Mean is Sum / Length.
|