Pure functions, immutability & declarative pattern… you’re in for a treat.

The updated article was moved here since Medium keeps breaking/removing code snippets.

Functional programming has its roots in lambda calculus, a mathematical concept dating back to the 1930s. That might sound daunting, but it’s really not. Without going into the mathematical theory, these principles will introduce you to some of the wonders of functional programming and its benefits for your software.

Let’s get right into it!

Favor Pure Functions

A function is pure if:


In other words, pure functions map inputs to outputs.

The caller and the…

Alex Nault

Software Developer @ Apprentx. B.S. in Computer Science. React, TypeScript and all things web fanatic. alexnault.dev

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store