Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bubblesort([A,DH|DT], Ret) :- D=[DH|DT],
- bubblesort(D, E),
- [B|G] = E,
- ((A =< B, Ret = [A|E]);
- (A > B, bubblesort([B,A|G], Ret))).
- bubblesort(A, A).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement