DEV Community

Discussion on: No duplicates challenge in Elm

Collapse
 
1hko profile image
1hko • Edited

You cases check for 1) an empty list, 2) a list with exactly two elements, and 3) a list with 2 elements and a tail. You forgot to check for the singleton list (a list with exactly one element) which is what the compiler is warning you about. Note, checking for a list with exactly two elements is not effective for this particular program.

Thread Thread
 
antonrich profile image
Anton

I'm taking a note of "checking for a list with exactly two elements is not effective for this particular program."