Scala Monads

Scala: map vs flatMap

Reading Time: 3 minutes While working with collections in Scala we frequently find ourselves using two most popular Functional combinators i.e, map() and its close cousin flatMap(). Both are higher-order functions. Click here to know more about higher order functions. In this blog, we will explore the the map and flatMap in detail. map(): The map method transforms a collection by applying a function to each element of that collection. map is a function Continue Reading

Monads: Are they really that complicated?

Reading Time: 5 minutes I have been working on Scala for around 2.5 years now, but still, feel that I have yet to explore a lot in this language. There are still a lot of topics unexplored. One such topic is Monads. I have heard and read about it a lot of times but never actually got a chance to explore it. Recently I came across the term and Continue Reading

Simplifying Monads in Scala

Reading Time: 2 minutes Monads are not at all a complex topic, but yes it comes under the advanced section of Scala language. So basically Monads is a structure that represents sequential computations. Monads is a structure that represents sequential computations, Monad is not a class or a trait; monad is a concept. A monad is an object that wraps another object in Scala, In Monad the output of a Continue Reading