Skip to content

Instantly share code, notes, and snippets.

@killballad
Created September 7, 2013 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save killballad/6480283 to your computer and use it in GitHub Desktop.
Save killballad/6480283 to your computer and use it in GitHub Desktop.
fn new_foo(a: &Path) -> Result<~Foo, ~str> {
// any way to flatten this?
do read_whole_file(a).map_move |b| {
do frob(b).map_move |c| {
do baz(c).map_move |d| {
~Foo { bar: d }
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment