dgadiraju
1/23/2017 - 8:58 AM

scala-closures.scala

// closure example
def m2: Int => Int = {
  val factor = 2
  val multiplier = (i: Int) => i * factor
  multiplier
}