monads

explore either in cats library

Exploring Eval Monad in Cats

Reading Time: 4 minutes While exploring Cats I learned about Monads and its different instances available for use and now I’m here sharing all of that with you all. 😊 In today’s blog, we will be exploring Eval Monad in Cats. Model of Evaluation From the model of evaluation, I am referring to the way that the value will be evaluated. Generally, we have two of them i.e. Eager Continue Reading

Explore Id Monad in Cats

Reading Time: 3 minutes Today we are going to explore Id Monad in Cats. If you don’t know about Monad I’ll suggest you go through this blog and then read this for better understanding. What is Id Monad? According to the referenced book: Id is actually a type alias that turns an atomic type into a single-parameter type constructor. Ahan! So, did you understand something? Let me explain it Continue Reading

explore either in cats library

Explore Either in Cats Library

Reading Time: 4 minutes Hey everyone, I’m back with another blog in which we are going to explore Either in Cats Library. For an introduction to Either Monad in Cats and comparison between Either in standard Scala Library and Cats Library, you can have a look at my previous blog i.e Either in Cats vs Either in Scala. Also, if you don’t know what is a Monad you can Continue Reading

Either in Cats vs Either in Scala

Reading Time: 4 minutes Hola amigos! Last time I discussed Monads in general and in Cats as well. In this blog, let’s have a look at one of the most known monad Either. I’ll be giving an introduction to it and also there will be a comparison between two i.e Either in Cats vs Either in Scala. What is Either? Either basically represents a value of one of two Continue Reading

Understanding Monads: An Introduction

Reading Time: 3 minutes In Scala, we all have heard about Option, Future etc. I also heard that they are Monads. It was a new term to me so I googled it and the definitions I initially read were too confusing. Here is one of them : What is Monoid? What are Endofunctors? Looking into all these is so complex. So here, I’ll try to cover Monads in a Continue Reading

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

monads

ScalaFP: Firsthand With Scala-Cats Monads – #1

Reading Time: 4 minutes In the previous post, we had a look at the reasons behind the monads and how monads can help us design the programs in a functional style. Now we are going to explore some of the monads which are frequently used in the applications but not available within the Scala predefined libraries. We will be exploring the monads which are provided by the scala-cats functional Continue Reading

monads

ScalaFP: Let’s Find The Reasons Behind Monads.

Reading Time: 5 minutes Monads in Functional Programming play an important role but they mostly confuse the beginners. One of the reasons for the confusion is that they mostly have a knowledge of imperative style programming, where they have no idea about function composition and its importance. In the terms of functional programming, the composition is the root where we have a set(Z) and we compose the elements of 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

Effective Programming In Scala – Part 2 : Monads as a way for abstract computations in Scala

Reading Time: 4 minutes Hi Folks, As we have already gone through the few parts of writting the Scala code in standard way in previous blog https://blog.knoldus.com/2016/06/28/effective-programming-in-scala/. Now carrying forward the concept of effective programming in scala, we are going to discuss about the monads first in this blog. What is a Monad ? Monad is a structure that represents sequential computations. The type of monad defines the means Continue Reading