3 ms·
One extremely useful resource is the Clojure Cheatsheet [1]. It organizes the standard library by all kinds of uses (data types, use cases, etc). It then links
by JamesLeonis 7y ago
One extremely useful resource is the Clojure Cheatsheet [1]. It organizes the standard library by all kinds of uses (data types, use cases, etc). It then links to the documentation of that function in Clojure.org, which often have examples of the function's use.
Likewise, each function page (if you scroll down) has a "See Also" which lists similar functions, which helps discover other functions in the standard lib.
Beyond the Standard Library, I find the Luminus Project [2] an excellent source of real-world code and documents for problems around web development. Further along these lines is the Clojure Cookbook [3] as well.
[1]: https://clojure.org/api/cheatsheet https://clojure.org/api/cheatsheet
[2]: http://www.luminusweb.net/docs http://www.luminusweb.net/docs
[3]: https://github.com/clojure-cookbook/clojure-cookbook https://github.com/clojure-cookbook/clojure-cookbook
> "lightbulb moments" for a dev steeped in C-like languages?
I'm from C++, so I feel what you mean when moving from Imperative to Functional. I have two insights that helped me:
* Despite the huge type systems, languages like C have "Raw Memory" as the universal data structure. Think about pointer magic or the `union` type. Clojure does something similar; Despite the different data structures, the universal structure is `seq` which allows iteration over a data structure in the same way pointers iterate over any memory.
* Clojure's immutable data structures eliminate the Pass-By-Reference and Pass-By-Value dichotomy. As such, you aren't so much (with functions) altering memory as transforming data. It feels much more like math (especially Linear Algebra) where you are transforming data. Seeing my code as a series of transforms greatly helps my understanding of a piece of Clojure code.