Category: Scala Tutorial

Scala – String Interpolation 0

Scala – String Interpolation

In the previous post, we have learnt about string literal and its basic functions in scala. In this post, we will see a concept called String interpolation introduced in scala version 2.10 that helps...

Scala – String 0

Scala – String

Scala string is a sequence of characters inside quotes. It is an immutable object like in java that means its values can not be modified. When you write a String in REPL (Read-Evaluate-Print-Loop) environment,...

Scala Closure 0

Scala Closure

In Scala, a function whose return value depends on one or more variables declared outside the function, is called as closure.In other term, we can say that function and variable declared outside are bound...

Scala – Nested Function 0

Scala – Nested Function

In Scala, a function defined inside another function is called nested function or local function. This feature is not supported by Java. In other languages, we can call a function from another function but...

Scala – Recursive Functions 0

Scala – Recursive Functions

In Scala, Recursion is an important concept in pure functional programming language.By definition, Recursive function is a function which calls itself. We need to to be careful while using recursive functions, because program may...

Scala Higher Order Function 0

Scala Higher Order Function

In scala, when a function accepts another function as an argument or returns a function as an output, is called Higher order function. Let’s understand this with examples. Example1 Map is the good example...