Skip to content

Instantly share code, notes, and snippets.

@aruld
Last active January 1, 2016 09:49
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 aruld/8127783 to your computer and use it in GitHub Desktop.
Save aruld/8127783 to your computer and use it in GitHub Desktop.
val employees = List("neal", "s", "stu", "j", "rich", "bob")
val result = employees
.filter(_.length() > 1)
.map(_.capitalize)
.reduce(_ + "," + _)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment