September 2017

COMP 211, the first computer science course I ever signed up for, was taught in the Racket programming language. If you haven't heard of it, you're in the majority. You may have heard of functional programming or Lisp; Racket is one of the more obscure members of the Lisp family of functional languages.

As a college freshman, I had certainly never heard of Racket. All of my programming experience (limited as it was) involved imperative languages, and the professor had his hands full teaching us the basics. At the end of the semester I moved on to 300-level courses taught in Java. The department retired COMP 211 and my knowledge of Racket began to fade.

From time to time, though, I would come across a discussion of functional programming on the internet. The postings were full of mysterious words like “functor” and “monad”, and I couldn't help but be intrigued. What are monads? They sound pretty cool. I want to be in the monad club.

So functional programming has been on the back of my mind for a while. This spring, I finally sat down to learn it, settling on the Haskell language. I was prepared to slog through lots of esotericism, but I found Haskell quite accessible. In fact, I recommend it: It's given me a fresh perspective on the day-to-day problems we tackle at work, and though I'm hardly an expert, I'm certain it's made me a better developer.

Here are highlights of my experience. It turns out that monads have been thoroughly covered by other people—we've got blog posts about blog posts about blog posts about monads—but I've put together a walkthrough of two other Haskell features that are powerful and easy to understand.