Author: Akash Kumar

Scala | Call by Value and Call by Name

Reading Time: 2 minutes In this blog we discuss about different ways of passing arguments in function call in scala. Call-by-Value By default scala use call-by-value for passing arguments to a function.Here is a function adder that uses the call-by-value strategy. The Call-by-value function evaluate the passed-in expression value before calling the function, so that same value accessed every time.Above all call by-value strategy has the advantage that it evaluates Continue Reading

Monads: Functional Programming in Scala

Reading Time: 3 minutes Introduction Monads have a deep basis in the mathematical side of computer science, coming out of category theory. Monads are nothing more than a mechanism to sequence computations around values augmented with some additional feature. This section will therefore present a condensed and simplified take on monads. As we said, a monad augments a value with some additional features. Such features are called effects. Some well-known effects Continue Reading