m:-numlist(0,5,L),findall(Y,(permutation(L,X),concat_atom(X,' ',Y)),Z),sort(Z,M),maplist(writeln,M).
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page