Daniel's Blog


programming and stuff

Typeclass in Swift and Scala

This post will discuss typeclass pattern in swift and scala and how they differ. To start off, let’s see what typeclass is.

Foldable vs Traverse In Scala

This post is last sequel to Monad In Scala, Applicative vs Monad in Scala, Semigroup And Monoid In Scala and Monad vs Monoid In Scala. We will wrap up our journey by introducing two new useful typeclasses that build upon Monoid and Applicative. But keep in mind that Foldable and Traverse do not extend Monoid and Applicative.

Monad vs Monoid In Scala

This post is a sequel to Monad In Scala, Applicative vs Monad in Scala and Semigroup And Monoid In Scala. So far we’ve made our journey through two realms of typeclasses: Functor, Applicative to Monad and Semigroup to Monoid. This post won’t introduce any new typeclass but rather give some general insights over how these two realms of typeclasses connect and maybe talk a little about category theory which is an overarching mathematical field where many of these typeclasses originate.

Semigroup And Monoid In Scala

This post is a sequel to Monad In Scala and Applicative vs Monad In Scala. In order to learn what Monoid is, we first need to look at what Semigroup is first.

Applicative vs Monad In Scala

In previous article, we’ve looked at how Monad is a more capable subclass of Applicative like being able to depend on previous monadic operation, etc. So does that mean we should always opt for Monad?