1
votes

I need a simple Prolog predicate like:

make_list_elements_unique([1,1,1,2,2,3], X) with X = [1,2,3].

Before starting to write it on my own, I want to search for a built-in predicate. I can't suggest that Prolog hasn't such a predicate.

Do you know it?

2

2 Answers

2
votes

You can use the built-in predicate sort/2 for this.

1
votes

I've found the built-in predicate list_to_set/2 for that!

Works very fine.