🥷 Clojure Pro Tip 2: group-by


Published: 2025-04-18, Last Updated: 2025-05-17

It's amazingly easy to group things in Clojure. The language core provides a group-by function directly. Together with many built-in functions or key functions, it creates a ton of possibilities, and we can also bake our grouping function if none is satisfying.

group-by
group-by

Example from Clojure Koans.


See also

comments powered by Disqus