Skip to content

Instantly share code, notes, and snippets.

@casualjim
Created September 3, 2011 09:45
Show Gist options
  • Select an option

  • Save casualjim/1190931 to your computer and use it in GitHub Desktop.

Select an option

Save casualjim/1190931 to your computer and use it in GitHub Desktop.
object PfExample {
val Path = """/users/(.*)""".re // pretty non-sensical in real life
def handleRequest: PartialFunction[Response] = {
case Path(theUserId) => {
// do heaps of stuff
// create response
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment