What is Scala Monad?
Monad is neither a data type nor class/trait. Monad is a concept. There are lot ways to describe a Monad. Monad is a construction that is used to perform successive calculations. Monad is a structure which represents a sequence of operations. Another way of defining a Monad is, it is an object that wraps around another object. As Monad is a container of sequence of operations, output of each step will be the input for the next step, which is parent of the current step. Maximum of the collections in Scala are Monads but not all of the collections are Monads.
2 thoughts on “What is Monad in Scala?”
Like!! I blog quite often and I genuinely thank you for your information. The article has truly peaked my interest.
Great explanation!! But can you tell us which collections are not monad?
How can we decide that?