Skip to content

Instantly share code, notes, and snippets.

@bbq2100
Created October 15, 2014 20:48
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 bbq2100/060f33617d7a81b38a50 to your computer and use it in GitHub Desktop.
Save bbq2100/060f33617d7a81b38a50 to your computer and use it in GitHub Desktop.
Difference between restricted and nonrestricted collection
val restrictedAccess: Map[String, Elem] = Map("scala" -> tweets("scala"), "java" -> tweets("java"))
val usingPartialFuncs: Map[String, (String) => Elem] = Map("scala" -> tweets _, "java" -> tweets _)
usingPartialFuncs.view.map{ t=> t._2(t._1) }.head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment