Skip to content

Instantly share code, notes, and snippets.

@bstrie
Created February 13, 2013 18:56
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 bstrie/4947114 to your computer and use it in GitHub Desktop.
Save bstrie/4947114 to your computer and use it in GitHub Desktop.
fn main() {
pvec(~[1,2,3]);
}
fn pvec(v: &[int]) {
match v {
[] => io::println("end"),
[head, ..tail] => { io::println(fmt!("%?", head)); pvec(tail); }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment