High-Order functions in Scala


I am posting the code snippet that progressively shows how the higher order functions can be written in Scala programming language I will detail the steps a bit later, code for now. class intSum { def sum(a: Int, b : Int) :Int = { if(a > b) 0; else a + sum(a+1,b) } def multiSum(addend: … Continue reading High-Order functions in Scala

Curried Functions in Scala


The following sample code snippet shows the power of Scala Curried functions. Being a .Net developer, I am really amazed by having Scala support this with less code, in C#, we could achievesimilar to this with some Action arguments to the methods Scala Currying functions in Scala Step1 : Define the lowest level of functionality … Continue reading Curried Functions in Scala