A desirable property of code is to facilitate local reasoning, as programmers we strive to write cohesive , loosely coupled code using mechanisms such as encapsulation for this purpose.

Functional programming promotes this property via its emphasis on avoiding side effects, expression oriented programming and referential transparency. Another mechanism that is employed is of pattern matching. In this two part series, I introduce this simple yet elegant mechanism which facilitate writing of simple yet robust code.

The choice between specialisation and generalisation is prevalent in many aspects of life, and software development is not immune. In the following paragraph I…

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