$ sudo port install scala
var list = List(1,2,3,4)
def unko(l:List[Int]):Int = l.isEmpty match { case true => 0 case false => l.head + unko(l.tail) }
scala> ((x:Int) => x * 2)(5) res45: Int = 10 scala> ((y:Int) => ((x:Int) => x * y)) (5)(4) res47: Int = 20