I want to write a predicate convert/2. It should work like this
? - convert([a,[a,a],[a,b],[b,a],[[a,b]],[d],c],X). X = [a,c,[a],[d],[a,b],[[a,b]]] yes ? - conv
Ok, but can you replace built-in function 'sort' by some other? this is most important here