As a Ruby-centric web developer, I am well-versed in Object-Oriented Design. It's a paradigm that serves its purpose well, but at times it can feel a bit insular. I feel it's difficult to completely understand how and why a system is put together the way it is without studying systems based on other paradigms. So around six months ago I set myself to the task of understanding functional programming. And looking back on my naive mid-2014 self, I would never have guessed how different pure FP really is, even compared to a function-heavy language like JavaScript.
I chose Haskell as my first functional language for several reasons — it's often regarded as the 'purest' functional language, it's deeply rooted in academia (so a lot of FP research is based on it), and it has a reasonably mature ecosystem. This article isn't about Haskell per se, though. It's meant to be a brief introduction to functional concepts presented in the familiar Ruby syntax. I'll use Haskell merely as a reference.
What follows is a soluti