Skip to content

Instantly share code, notes, and snippets.

@brson
Created September 19, 2012 19:20
Show Gist options
  • Save brson/3751648 to your computer and use it in GitHub Desktop.
Save brson/3751648 to your computer and use it in GitHub Desktop.
fn spawn<T: Send>(val: T, f: extern fn(T)) {
f(val);
}
fn f(+i: int) {
assert i == 100;
}
fn main() {
spawn(100, f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment