Skip to content

Instantly share code, notes, and snippets.

@mariussoutier
Created January 17, 2011 10:12
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 mariussoutier/782684 to your computer and use it in GitHub Desktop.
Save mariussoutier/782684 to your computer and use it in GitHub Desktop.
// "Write less, do more" episode 1203: iterating Strings creates chars, yielding chars creates a String
def abbreviatedName(fullName: String) = for (ch <- fullName; if ch.isUpper) yield ch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment