Home My formal education Article list Prolog Prolog list permutaion function

Prolog list permutaion function

E-mail Print
Share/Save/Bookmark
%permutation(X,L)
%X - input list
%L - possible permutation

permutation([],[]).
permutation([X|L],P):-
permutation(L,L1),
insert(X,L1,P).
Hits: 1318
Comments (0)Add Comment

Write comment

busy
Last Updated ( Wednesday, 27 August 2008 13:10 )  

Donate

Do you find content useful? Please donate so I can cover my hosting expenses! Thanks!