Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Function[X, Y] {
- def apply(x: X): Y
- }
- class Foo {
- def bar(x: Int): String
- }
- val f = foo.bar(_)
- val f = new Function[Int, String] {
- def apply(x: Int) = foo.bar(x)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement