I was browsing around and found a question about grouping a String by it\'s characters, such as this:
String
The input:
\"aaabbbccccdd\" >
\"aaabbbccccdd\"
Basically list.groupBy(identity) is just a fancy way of saying list.groupBy(x => x), which in my opinion is clearer. It groups a list containing duplicate items by those items.