Skip to content

Instantly share code, notes, and snippets.

@nuboat
Last active September 22, 2018 15:11
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 nuboat/35e957f182e6b3a72f0cc2f0e0a1ddb1 to your computer and use it in GitHub Desktop.
Save nuboat/35e957f182e6b3a72f0cc2f0e0a1ddb1 to your computer and use it in GitHub Desktop.
def f(w: String, l: List[String]) = l.foldLeft(w)((x,y) => x.replace(y,"")).isEmpty
f("bigbears", List("b", "i", "g", "e", "a", "r", "s"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment