Author: Shubham

All you need to know about Higher-Order Functions

Reading Time: 2 minutes The reduce() method is a HOF that takes all the elements in a collection (Array, List, etc) and combines them using a binary operation to produce a single value. Functional languages treat functions as first-class values. This means that, like any other value, a function can be passed as a parameter and returned as a result. This provides a flexible way to compose programs. function that take Continue Reading

Call by Value and Call by Name

Reading Time: 2 minutes Call by value In the Call by value method of parameter passing in Scala – a copy is to be passing by the method. This means that the parameters passed to the method have nothing to do with the actual values. These parameters are formal parameters.  The changes that we make in the formal parameters are not visible in the actual parameters (the values pass while calling the method Continue Reading