Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def mulBy(by: Int)(x: Int) = x * by
- val list = List(1, 2, 3)
- // doesn't work
- List(1, 2, 3).map(mulBy)(1)
- // works
- val x = List(1, 2, 3).map(mulBy)
- val y = x(1)
- // works
- (List(1, 2, 3).map(mulBy) _)(1)
- // Why?
Add Comment
Please, Sign In to add comment