Author: Jyoti Sachdeva

Currying vs Partially Applied Function

In this blog, I’m going to discuss about currying and partially applied functions. CURRYING Currying splits method with multiple parameters into a chain of functions – each with one parameter. Let’s understand currying using an example: scala> def multiply(a: Int)(b: Int)(c: Int) = a * b * c is the same as: def multiply(a: Int) = (b: Int) => (c: Int) => a * b Continue Reading

HIGHER ORDER FUNCTIONS IN SCALA

In this blog, I’m going to explain higher-order functions. A higher order function takes other function as a parameter or return a function as a result. This is possible because functions are first-class value in scala. What does that mean? It means that functions can be passed as arguments to other functions and functions can return other function. The map function is a classic example Continue Reading

How to use extractors in Scala ?

This blog will guide you through the basic understanding of extractors in Scala. An extractor is an object that has an unapply method. It takes an object as an input and gives back arguments. Custom extractors are created using the unapply method. The unapply method is called extractor because it takes an element of the same set and extracts some of its parts,  apply method also called Continue Reading

CodeSquad: An insight into code quality

http://getcodesquad.com/ Software development has reached beyond the mere question of, “Does it work?”’ However, the question of “how to improve the code quality and its efficiency?” becomes the primary concern. The code quality improvement is one of the things that requires well-developed strategy and adhering to it throughout the project’s lifecycle. It’s only a matter of time when it catches you up and causes problems Continue Reading

%d bloggers like this: