Functional Programming In Scala

Functors in Functional Programming

Functors in Functional Programming

Reading Time: 5 minutes 1. Overview In this tutorial, we’ll take a look at Functor type class in Cats. The idea of Functor is “something that can be mapped over”, we’ll see what is actually mapped and how. In functional programming, Functors come into play when we have types or values wrapped inside contexts or containers. We don’t have to know any of the implementation details of those contexts Continue Reading

Scala Cats - Functors

Diving into Scala Cats – Functors

Reading Time: 4 minutes If you’re new to the concept of type classes I suggest you read my other article explaining them. The Cats library makes extensive use of type classes and a basic understanding is a prerequisite for this article. In previous articles, we talked about Semigroups and Monoids, which are abstractions that let us combine values of the same type together. In this post, we’ll take a look at Functors, which Continue Reading

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

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

A Quick Start to Cats Library

Reading Time: 3 minutes Hi everyone, recently I started exploring Cats library in Scala and so here I’m presenting you the first session on “Introduction to Cats”. It will give you a head start in Cats. Let me give you a brief description as well. What is Functional Programming? Functional programming (FP) is a style of software development emphasizing functions that don’t depend on program state. Functional code is Continue Reading

ScalaGeek: Are you ready for the Challenge?

Reading Time: 4 minutes ScalaGeek is an application which promotes Scala concepts with a twist of gaming. It has been published with minimum features or challenges for the users, however, there will be more challenges added later on. The game is divided into Levels and stages. Every stage will have actions which the user need to perform. Once all the actions have been performed on the basis of time taken for it. Although one Continue Reading

Scala 3.0

Functional Programming: A Paradigm

Reading Time: 4 minutes It’s surprisingly hard to find a consistent definition of functional programming. But I think you can define FP with just two statements: 1. FP is about writing software applications using only pure functions. 2. When writing FP code you only use immutable values. Hence, Functional programming is a way of writing software applications using only pure functions and immutable values. Now, let us understand the 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