DEV Community

Discussion on: Count the number of identical objects in List[_]

Collapse
 
jakebman profile image
jakebman

I disagree. In this context, head is guaranteed to exist, as there would not be a pair generated from groupby that is (somekey, EmptyList), as somekey had to come from at least one item.