Skip to content

Instantly share code, notes, and snippets.

@nikomatsakis
Created August 2, 2012 18:21
Show Gist options
  • Save nikomatsakis/3239364 to your computer and use it in GitHub Desktop.
Save nikomatsakis/3239364 to your computer and use it in GitHub Desktop.
fn each_mut<V>(v: &[mut V], op: fn(v: &mut V) -> bool) {
for uint::range(0, v.len()) |i| {
if !op(&mut v[i]) { return; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment