MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Clojure/comments/i7bd9f/counting_elements/g16rihs/?context=3
r/Clojure • u/JavaSuck • Aug 10 '20
17 comments sorted by
View all comments
2
I find the groupingBy identity and then reducing by counting quite easy and natural to read.
1 u/JavaSuck Aug 12 '20 That's because it's idiomatic Java 8, you'll find it in lots of places and Stack Overflow answers.Before Java 5, for (Iterator<String> it = strings.iterator(); it.hashNext(); ) { String s = it.next; ... } was also quite easy and natural.
1
That's because it's idiomatic Java 8, you'll find it in lots of places and Stack Overflow answers.
Before Java 5, for (Iterator<String> it = strings.iterator(); it.hashNext(); ) { String s = it.next; ... } was also quite easy and natural.
for (Iterator<String> it = strings.iterator(); it.hashNext(); ) { String s = it.next; ... }
2
u/lenkite1 Aug 12 '20
I find the groupingBy identity and then reducing by counting quite easy and natural to read.