Skip to content

Instantly share code, notes, and snippets.

@bstrie
Created October 12, 2012 04:29
Show Gist options
  • Save bstrie/3877311 to your computer and use it in GitHub Desktop.
Save bstrie/3877311 to your computer and use it in GitHub Desktop.
fn with<T, U, V>(foo: fn() -> U, bar: fn(U) -> V) {
bar(foo());
}
fn open() -> int {
return 1;
}
fn main() {
do with(open) |f| {
log(error, f);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment