Skip to content

Instantly share code, notes, and snippets.

@mariussoutier
Created January 17, 2011 10:12
Show Gist options
  • Select an option

  • Save mariussoutier/782684 to your computer and use it in GitHub Desktop.

Select an option

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