fork download
  1. object Main extends App {
  2. def higherOrderFunction():(Int,Int)=>Int = {
  3. def localMax(x:Int, y:Int):Int = {
  4. if(x>y) x
  5. else y
  6. }
  7.  
  8. localMax
  9. }
  10.  
  11. val function = higherOrderFunction()
  12.  
  13. println(function(7, 10))
  14. }
Success #stdin #stdout 0.39s 322176KB
stdin
Standard input is empty
stdout
10