What is a Closure in Scala ? Why it is required ? How to use it ?
Reading Time: 2 minutes Objects are more flexible for certain use cases because they carry both data members and member functions, whereas a function does not have data members. So if there is a requirement to pass data members along with functions, How will we achieve it in functional programming ? The answer is yes, we can achieve it using a closure and a free variable. What is a Continue Reading