Clojure: sorting

Sorting collections of items is something that comes up frequently in software development. This post covers the multitude of ways you can sort things in Clojure.

Lisp-1 vs Lisp-2

The Lisp family of languages is relatively new to me. I learned both Clojure and Emacs Lisp at the same time, as Emacs is a popular Clojure editor. Learning these two lisps side by side has made me wonder about the subtle differences between the two, in particular how they approach passing functions as arguments to other functions (first class functions). It turns out this boils down to Clojure being a lisp-1 and Emacs Lisp a lisp-2.

Clojure: juxt and separate

Juxt is one of those higher-order functions that you never knew you needed. Despite not using it that often I find it can still be surprisingly useful. Let's check out the docs.

Desert island code: compose and pipe

You awake a castaway on a desert island. After some time you come across an ancient computation device, the programming of which might hold your salvation!

Desert island code: curry

You awake a castaway on a desert island. After some time you come across an ancient computation device, the programming of which might hold your salvation!