Prolog unique value in list

Viewed 6278

I learing Prolog language for exam at college and I don't know how to create function which: check unique values in list. I mean, if each value in list are unique function return true, otherwise return false. eg.

[1,2,3,5] - true
[1,2,2,4] - false

Header for this function is uniqueValues(X) X - mean list. I really don't know this language and if anyone can explain me how to create this function will be great. Thanks in advence for help

1 Answers
Related