Scala collections

Collections And (Im)Mutability in Scala (Part-1)

Reading Time: 5 minutes Collections in Scala systematically distinguish between mutable and immutable collection. In this blog we are gonna discuss Mutability of Immutable collections in Scala. Collections in Scala – These are nothing, just like containers. Those containers can be Sequence, Set or Map. Scala provides a rich set of Collections library which can be mutable or immutable. In Scala, Collections are classified into 3 categories with the Continue Reading

Combating Fallacy in Scala

Combating Fallacy in Scala: Part 2

Reading Time: 3 minutes Welcome back to this amazing series of Combating Fallacy in Scala: Part 2. For this part, the topic will be “Tuple Unpacking”. So, let’s move forward. Tuple Unpacking Before looking into this, let’s have a look at Tuple in Scala. According to the Scala Docs “A tuple is a neat class that gives you a simple way to store heterogeneous (different) items in the same container.“ A tuple provides Continue Reading

Map in SCala

Map in scala

Reading Time: 3 minutes Hi everyone, today I’ll be discussing different types of Map is Scala. I will try to differentiate between the different types of maps to make it easy to understand. So, let’s begin !! What is a Map in Scala? A map is a collection in Scala. It is a collection of key/value pairs. The key and value pairs are also known as mappings and associations. 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

Are you using Scala Collection efficiently?

Reading Time: 5 minutes In this blog, We will be going to explore how we can use scala collections efficiently . Though, we are taking care of immutability but still something more can be done to make your code more readable and faster. List vs Vector: Vector is a collection with good random access. List is indeed a linked list with very fast append-first operation (::), but the links Continue Reading

Scala Map

Reading Time: 6 minutes Scala Map is a collection of Key-value pair. A map cannot have duplicate keys but different keys can have same values i.e keys are unique whereas values can be duplicate. Maps in Scala are not language syntax. They are library abstractions that you can extend and adapt. Scala provides mutable and immutable alternatives for maps. Class hierarchy for scala maps is shown below:   Image Continue Reading

Effective Programming In Scala – Part 1 : Standardizing code in better way

Reading Time: 4 minutes A language is a set of standards. One has to follow them in order to avail benefits from the language. In order to maintain these standards, code in Scala has to be written in order to minimize the errors whether they are related with the concepts like redundancy of operations, use of properties of language those not supported by ScalaStyle or ScapeGoat or other checkers. Continue Reading

Working With Scala Collections

Reading Time: 2 minutes We have a monthly iBAT (Inphina Beer and Technology Sessions). We look forward to this day and it was Scala day this time. I presented on Scala collections. Scala collection is elegant and concise. Scala Collections like java is object-oriented and we can work with generic types. It is optionally persistent i.e can be mutable and immutable. It provides higher order methods like foreach, map Continue Reading