Category Archives: functional programming

Functional APIs: an OOP approach to FP

In the series of posts about the essence of functional programming, we’ve already seen how we can build purely declarative programs using GADTs. This is a picture of what we got (using more standard cats/scalaz data types): This program above … Continue reading

Posted in algebra, functional programming, Scala, Type Class | Leave a comment

From “Hello, world!” to “Hello, monad!” (part III/III)

In the first part of this series, we saw how we can write the business logic of our applications as pure functions that return programs written in a custom domain-specific language (DSL). We also showed in part II that no matter … Continue reading

Posted in Embedded DSLs, functional programming | Tagged , , | 1 Comment

From “Hello, world!” to “Hello, monad!” (Part II/III)

In the first part of this series, we set forth the essence of functional programming, namely, being declarative. This was illustrated with the ubiquitous “Hello, world!” example, a ridiculously simple program which, nonetheless, allowed us to introduce the major concepts … Continue reading

Posted in Embedded DSLs, functional programming, Scala | 1 Comment

From “Hello, world!” to “Hello, monad!” (Part I)

This is the first instalment of a series of posts about the essence of functional programming. The only purpose of this series is to illustrate the defining features of this style of programming using different examples of increasing complexity. We will start with the ubiquitous “Hello, world!” … Continue reading

Posted in functional programming, Scala | Tagged , | 3 Comments