Skip to content

Instantly share code, notes, and snippets.

@sanaulla123
Created April 20, 2012 04:33
Show Gist options
  • Save sanaulla123/2426021 to your computer and use it in GitHub Desktop.
Save sanaulla123/2426021 to your computer and use it in GitHub Desktop.
First Programming Exercise at GIDS 2012 Functional Programming Workshop
object FirstExercise{
def main(args:Array[String]) = {
val names = List("John", "Jack","Jill","Sam","William")
println(names)
val names2 = names.map{key => (key,key.length)}
println(names2)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment