scala

Generate logical plan in Calcite

Reading Time: 2 minutes Hello everyone! in the previous blog of Apache Calcite we discussed how Apache Calcite helps you to parse the database query and some basics. In this blog, we will discuss how to generate the logical plan of the database query you have written. What is logical plan A logical plan is a relational expression with only a logical operator. Logical algebra has no implementation of the relational operator and therefore Continue Reading

Introduction to Scala.js

Reading Time: 4 minutes A safer way to build robust front-end web applications! http://www.scala-js.org/ In this blog, we are gonna utilizing a whole lot of features of Scala to build a simple front-end application using Scala.js. So, let’s get it started- Step-1: – Creating an sbt project Create a folder named scala-js-example and inside it create a build.sbt. build.sbt Now, create a new folder named as a project inside 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

Scala3 Vlog: Union Types

Reading Time: < 1 minute Hello folks, We have released another video on Scala3 series which talks about a new type i.e. Union Types. Union Type is a type which is one of a set of other type, or a type of a variable or expression which can consist of multiple types. And the main reason for introducing Union Types in Scala is that for every set of types, we 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

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

Scala Cats - Functors

Diving into Scala Cats – Monoids

Reading Time: 2 minutes Today we are going to deep dive into the Scala Cats again to find out about Monoids. If you haven’t already read my post about Diving into Scala Cats – Semigroups I suggest you do so now. What are Monoids? The Monoid extends Semigroup and adds a default or fallback value for the given type. Monoid type class comes with two methods – one is the combine method of Semigroups, Continue Reading

New Chaining Operations in Scala 2.13

Reading Time: 2 minutes Scala 2.13 gave us two chaining operations, namely pipe and tap. To call methods one after the other in one go, we use chaining operations. Pipe pipe() is used to convert the input value to a new output value formed by applying the function provided to it in the parameter.Definition : def pipe[B](f: (A) => B) : BHere, the input value of type A will be converted 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