Skip to content

Instantly share code, notes, and snippets.

@retronym
Created April 3, 2011 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retronym/900853 to your computer and use it in GitHub Desktop.
Save retronym/900853 to your computer and use it in GitHub Desktop.
scala> object OL { def foo() = ""; def foo(a: Any) = "" }
defined module OL
scala> OL.foo _
res4: () => java.lang.String = <function0>
scala> object OL { def foo(a: Any) = ""; def foo() = "" }
defined module OL
scala> OL.foo _
res5: () => java.lang.String = <function0>
scala> object OL { def foo(a: Any) = ""; def foo(a: Any, b: Any) = "" }
defined module OL
scala> OL.foo _
res6: (Any, Any) => java.lang.String = <function2>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment