Guest User

Untitled

a guest
Feb 26th, 2016
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.31 KB | None | 0 0
  1. Welcome to Scala version 2.11.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_80).
  2. Type in expressions to have them evaluated.
  3. Type :help for more information.
  4.  
  5. scala> val x=5
  6. x: Int = 5
  7.  
  8. scala> val f = (y:Int) => x + y
  9. f: Int => Int = <function1>
  10.  
  11. scala> val x=0
  12. x: Int = 0
  13.  
  14. scala> f(10)
  15. res0: Int = 15
Advertisement
Add Comment
Please, Sign In to add comment