Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Welcome to Scala version 2.11.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_80).
- Type in expressions to have them evaluated.
- Type :help for more information.
- scala> val x=5
- x: Int = 5
- scala> val f = (y:Int) => x + y
- f: Int => Int = <function1>
- scala> val x=0
- x: Int = 0
- scala> f(10)
- res0: Int = 15
Advertisement
Add Comment
Please, Sign In to add comment