Implemented List.exactlyOne and List.distinct.