Created
April 20, 2012 04:33
-
-
Save sanaulla123/2426021 to your computer and use it in GitHub Desktop.
First Programming Exercise at GIDS 2012 Functional Programming Workshop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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