Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- elim([E | Rest], E, Rest).
- elim([X | Lst], E, [X | Rest]) :- elim(Lst, E, Rest).
- perm([], []).
- perm([H | Lst], Perm) :- perm(Lst, NPerm), elim(Perm, H, NPerm).
- sortList([], []).
- sortList(Lst, S) :- perm(Lst, S), isSorted(S).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement