Category: elixir

Closures in PHP, Javascript and Elixir

Closures are one of the fundamental building blocks of functional programming techniques. A Closure is a construct that permits to bind the definition of a function together a particular scope, normally implemented via anonymous functions. They are particularly important, for example in the implementation of event callbacks. Let’s see how they work in three different […]

Function composition in Javascript and Elixir

Function composition is a programming technique that could be very useful and very expressive at the same time. Essentially it consists to combine N simple (unary and hopefully pure) functions making the output of a function being the input for another one. To make working function composition in Javascript we need to extend the Function […]