Skip to content

Instantly share code, notes, and snippets.

@dbp
Created October 9, 2012 03:12
Show Gist options
  • Save dbp/3856358 to your computer and use it in GitHub Desktop.
Save dbp/3856358 to your computer and use it in GitHub Desktop.
purity
struct C {mut d: ~[uint]}
fn main() {
let mut c = C {d: ~[1,2,3]};
f(&c);
}
fn f(x: &C) {
for x.d.each |e| {
io::println(~"a");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment