Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object Demo {
- def main(args: Array[String]) {
- println( apply( layout, 10) )
- }
- def apply(f: Int => String, v: Int) = f(v)
- def layout[A](x: A) = "[" + x.toString() + "]"
- }
- <A> String layout(A x){
- return "[" + x.toString() + "]";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement