Introduction to Functors With Scala 3

You’ve recently started learning functional programming and have been successful in writing functions, but then something unexpected happens. A wild functor appears! What is that? Why is it here? Don’t be scared, functors are a mathematical structure that arises from category theory, and they can be found everywhere in functional programming.

Continue Reading

ADTs in Scala (Part 2: ADTs vs OO-Classes)

In my latest post I presented ADTs in Scala 3. I also created a Youtube video about it (check it out here). Since the content was longer, I split it in three parts. This is the second part. We look at the differences between classes and ADTs. We discuss: Immutability Inheritance Public and private fields Methods Pattern matching This video is an introduction to ADTs in Scala for object-oriented developers.

Continue Reading