clamda is clojure.core on Ramda steroids.
Clojure is an utterly brilliant programming language that has fundamentally changed the way I think about writing software.
Ramda is a fantastic functional library for the JavaScript/Node community, and though I am loving
Clojure, I do miss Ramda. Like... a lot.
clojure.core wartsClojure is a fantastic functional language with an incredible core library. But some of the design choices
and naming leave me wanting a more consistent way to work with the core utilities. The downside of some
of clojure.core include:
assoc, update, et. al)every? vs some, not to be confused with some? which is (complement nil?)...)Yes, I'm telling you Clojure could learn a few things from a scrappy JS library that I have really grown to love.
Ramda has a pretty good API where:
ifElse, when, tryCatch, etc.applySpec and evolve for functional map/object construction.I wrote clamda to fill in some missing gaps in the clojure core API, and I hope you find them useful. Some things I did:
curry, curry-n, and even a defcurry macro.defcurry.Ramda fn names (like pathSatisfies -> path-satisfies, or pathEq -> pathEq).>, >=, if, when, etc).select-keys, now called pick).assoc, assoc-in, update, update-in).You'll also notice that I haven't included everything from Ramda, at least not yet. My guess is that there are plenty of fns
in Ramda that won't need translation simply because Clojure already supports (or negates the need for) some of them.
And before you get all mad about Rich being "Right About Everything", I don't really care. Rich is brilliant and made an amazing
language, but I like curried/data-last fns more than I like variadic fns and macro thread rewriting of argument passing.
Both approaches have a lot of value and I plan on continuin to write variadic functions (sometimes with curry-n to really
turn up the juice). I know, salty. How do you know you won't like it until you try it though...
<version> in pom.xml./bin/swap to go into "maven mode" directory structure.mvn deploy to push to clojars../bin/swap back out of "maven mode".Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |