Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Created January 23, 2017 08:58
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 dgadiraju/058c90da681b17baba3888a690895efb to your computer and use it in GitHub Desktop.
Save dgadiraju/058c90da681b17baba3888a690895efb to your computer and use it in GitHub Desktop.
// closure example
def m2: Int => Int = {
val factor = 2
val multiplier = (i: Int) => i * factor
multiplier
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment