Skip to content

Instantly share code, notes, and snippets.

@mdekstrand
Created January 12, 2013 18:23
Show Gist options
  • Save mdekstrand/4519754 to your computer and use it in GitHub Desktop.
Save mdekstrand/4519754 to your computer and use it in GitHub Desktop.
Processing code for path-dependent types post.
def fetch[T](req: WebRequest[T]): Result[T]
def process(need: Need) {
val req = need.request
val res = fetch(req)
// now we save the data
res match {
case Good(data) => need.save(store, data)
/* error cases */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment