functional programming

## Functional Programming notes: Algebraic data types and their algebra

When we think about types we usually think about how they can help us to abstract concepts. In this post we will learn how we can think about types in terms of cardinality and why some types are equivalent to …

functional programming

## Functional Programming notes: Lists

In the previous posts we stated that functional programs should limit side effects. If we take that hypothesis as true, how can we implement a List? At a first glance, a data structure to hold data seems the opposite …

functional programming

## Functional programming notes: Higher-order functions

In the previous post we defined functions and function composition. Now that we know how function composition works, Let’s take one step further with higher-order functions

Higher-order functions

The idea behind higher-order functions is that functions are values, hence functions can be …

functional programming

## Functional programming notes: Functions

In the previous posts, we took a look at how functions are the core pieces in functional programming languages. We talked about pure functions, referential transparency, side effects and recursion in the previous posts. In this post, we are going …

functional programming

## Functional Programming notes: Recursion

Recursion is a technique that allows us to break down a problem into smaller pieces. This technique allows us to remove some side effects that we perform while writting looping structures and also makes our code more expressive and readable. …

functional programming

## Functional programming notes: Side effects

Functional programming is based on the simple premise that your functions should not have side effects, they are considered evil in this paradigm. If a function has side effects we call it a procedure, so functions do not have side …