Hi! So I’m working on this assignment, essentially I’m having some trouble thinking about a way to go about this. The problem is to identify if a list has duplicate elements, and return true if it does. For example, [1;2;3;4] would be false, and [1;2;2;3] would return true. In java I would probably just take the first element then check if the rest are equal to the first element, and move on until the end of the list. How would I get started in OCaml?
My current code isnt much, but I know that for pattern matching, obviously I have the ->false, but to traverse the list I’m confused how to go about it