Scala – Sets
Scala Sets is a collection of pairwise different elements of the same type. In other words, a Set is a collection that contains no duplicate elements. There are two kinds…
Scala Sets is a collection of pairwise different elements of the same type. In other words, a Set is a collection that contains no duplicate elements. There are two kinds…
Scala Lists are quite similar to arrays which means, all the elements of a list have the same type but there are two important differences. First, lists are immutable, which…
In this guide, we will discuss Scala Collections. Scala has a rich set of collection library. Collections are containers of things. Those containers can be sequenced, linear sets of items…
In this guide, we will discuss Scala Arrays. Scala provides a data structure, the array, which stores a fixed-size sequential collection of elements of the same type. An array is used…
This chapter takes you through the Scala Strings. In Scala, as in Java, a string is an immutable object, that is, an object that cannot be modified. On the other…
In this guide, we will discuss Scala Closures. A closure is a function, whose return value depends on the value of one or more variables declared outside this function. The following piece…
In this guide, we will discuss Scala Currying Functions. Currying transforms a function that takes multiple parameters into a chain of functions, each taking a single parameter. Curried functions are…
In this guide, we will discuss Scala Anonymous Functions. Scala provides a relatively lightweight syntax for defining anonymous functions. Anonymous functions in source code are called function literals and at run time,…
In this guide, we will discuss Scala Higher-Order Functions. Scala allows the definition of higher-order functions. These are functions that take other functions as parameters, or whose result is a function.…
In this guide, we will discuss Scala Recursion Functions. Recursion plays a big role in pure functional programming and Scala supports recursion functions very well. Recursion means a function can…