Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created March 14, 2015 10:08
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 shigemk2/9f60db93e4bf4e0ebb6a to your computer and use it in GitHub Desktop.
Save shigemk2/9f60db93e4bf4e0ebb6a to your computer and use it in GitHub Desktop.
implicit def convert(xs:List[Int]) = new {
def double() = xs.map(x => x*2)
}
println(List(1,2,3,4,5).double())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment