Reference: Idiomatic way to represent sum type (Either a b) in Clojure how do you represent sum types, also known as tagged unions and variant records? Something like Either a b in Haskell or Either[+A, +B] in Scala. Either has two uses: to return a value of one of two types or to return two […]
Small, precise guides to a particular feature.
Function application is a key concept in lambda calculus. While it is commonly expressed using parentheses in Clojure, it is also reified into a function which itself can be applied to another function.
Clojure is well-suited for processing JSON, but there are some decisions you have to make to suit your application. The major decisions are actually easy, though they took me a while to figure out.
`clojure.core/reduce` is a powerful function, yet the code for it is so simple. It’s four lines! We TDD our own implementation.
Clojure uses both parentheses and square brackets as part of its syntax. It might at first appear to be arbitrary, but it’s actually systematic. What’s more, it reveals one of the coolest things about Clojure: expressions define how they interpret their arguments.
With a few functions from the standard library, Clojure lets you do most of what you want with regular expressions with no muss.