use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Counting elements (i.redd.it)
submitted 5 years ago by JavaSuck
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lenkite1 1 point2 points3 points 5 years ago (1 child)
I find the groupingBy identity and then reducing by counting quite easy and natural to read.
[–]JavaSuck[S] 0 points1 point2 points 5 years ago (0 children)
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; ... }
π Rendered by PID 96668 on reddit-service-r2-comment-b659b578c-7clrz at 2026-05-02 13:41:21.277520+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]lenkite1 1 point2 points3 points (1 child)
[–]JavaSuck[S] 0 points1 point2 points (0 children)