Monads are about "happy paths"

This keynote does a good job in stressing that monads are all about allowing programmers to write explicit code only for the happy path in the specific context at hand (e.g., in the context of a "throwable" computation)…

What is functional programming?

An amazing two-article series on the nature of functional programming and how it compares to object-oriented programming. Part 1 - What Is Functional Programming? Part 2 - Which Programming Languages Are Functional?…

Failures in the presence of side-effects

Failures are difficult, yet our applications tend to fail more than we would want them to. More so, failures in the presence of side-effects are specially dangerous, because we need to somehow revert the changes we’ve applied, but before we do that we need to know how much of…

From impurity to purity

Something to note is that you can transform some impure functions into pure ones by delaying evaluation var pureHttpCall = function (url, params){ return function() { return $.getJSON(url, params); }; }; We don't actually make the HTTP call - we instead return a function that will do so when called. This function is…