I've been intrigued by the Y-Combinator since I was first introduced to the idea by a friend. On face value, the idea of recursion via nothing but lambda expressions is a subtle and powerful concept that takes time to sink in and reveal its inner elegance and simplicity. It truly feels like a wonder of wonders. Yet, today I attempted to convey that wonder of wonders to my coworkers. As part of my 30 days...
I recently attended Lambda Conf 2015. Coming from a dynamically typed background of working mostly in Ruby and Clojure, I had only a superficial understanding of type theory and how it applies to functional programming in languages like Haskell and Purescript. I had some vague idea that static typing in a functional programming context would result in better, easier to reason about, and easier to maintain code, but I hadn't experienced it enough first-hand to...
Lately I've wondered what it would be like to try to write some of Ruby's enumerable methods using only lambdas. I previously had given a talk about the Y combinator and was already familiar with the notion of a fixed point combinator. I was curious to see what it would take to implement Ruby's inject method supporting the basic arithmetic operations and Ruby's zip method. To follow this post, I'm assuming you have a comfortable...