Skip to content

Instantly share code, notes, and snippets.

@iwazer
Created May 11, 2011 00:37
Show Gist options
  • Save iwazer/965686 to your computer and use it in GitHub Desktop.
Save iwazer/965686 to your computer and use it in GitHub Desktop.
可変長引数の渡し方
def a(ss: String*) = ss.toList.foreach(println(_))
// Error!!
// def b(ss: String*) = a(ss)
// Success
def b(ss: String*) = a(ss:_*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment