Skip to content

Instantly share code, notes, and snippets.

@tototoshi
Created October 16, 2012 11:40
Show Gist options
  • Save tototoshi/3898787 to your computer and use it in GitHub Desktop.
Save tototoshi/3898787 to your computer and use it in GitHub Desktop.
scala> "a".format(_)
res0: Any* => String = <function1>
scala> "a".format(_: String)
res1: String => String = <function1>
scala> "a".format(_: String, _: String)
res2: (String, String) => String = <function2>
scala> "a".format(_: String, _: String, _: Int)
res3: (String, String, Int) => String = <function3>
scala> "a".format _
<console>:8: error: missing arguments for method format in trait StringLike;
follow this method with `_' if you want to treat it as a partially applied function
"a".format _
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment