Toggle navigation
?
users online
Logout
Open hangout
Open chat for current file
%person(name, surname, age). % person('A', 'H', 22). person('B', 'G', 24). person('C', 'F', 20). person('D', 'E', 44). person('E', 'D', 45). person('F', 'C', 51). person('G', 'B', 40). person('H', 'A', 51). %rule to count how many person are. % count_person(Total_count):- findall(N, person(N, _, _), List), length(List, Total_count). %rule to sum all the ages. % sum_ages(Total_sum):- findall(Age, person(_, _, Age), List), sum_list(List, Total_sum).