Skip to content

Instantly share code, notes, and snippets.

View JDevlieghere's full-sized avatar

Jonas Devlieghere JDevlieghere

View GitHub Profile
partition([],_,[]).
partition(List,Size,[Team|Teams]):-
team(List,Size,Team),
findall(X,(member(X,List),\+member(X,Team)),Overige),
partition(Overige,Size,Teams).
team(_,0,[]).
team(List,Size,[R|Team]):-
Size > 0,
T is Size - 1,