Skip to content

Instantly share code, notes, and snippets.

@harmeetsingh0013
Created December 28, 2017 09:41
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 harmeetsingh0013/66c751beda18d6c13edb8031d886f3d8 to your computer and use it in GitHub Desktop.
Save harmeetsingh0013/66c751beda18d6c13edb8031d886f3d8 to your computer and use it in GitHub Desktop.
object Test extends App {
val func = (a: Int) => a + 1
def funcd(a: Int) = a + 1
val inc = funcd _
List(1, 2, 3, 4, 5).map(func)
List(1, 2, 3, 4, 5).map(funcd)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment