Clojure to Haskell: Composition

I’ve been playing with Clojure on and off for the past couple of years and have recently started to learn a little Haskell. I’ve read through a fair chunk of Learn you a Haskell and now I’m working through the CIS194 materials from UPenn after being introduced to them at the Brisbane Functional Programming Group. Side note: they’ve been doing their own presentations of the lectures and the videos are on their Vimeo channel (search for “Yorgey”).

While tackling the second week’s exercises I thought I could write a clean solution using point free syntax based on my experience with composition and partials in Clojure. I couldn’t. Unsurprisingly, Clojure’s lack of static typing gives it more room to move in these cases.

Continue reading