Skip to content

Instantly share code, notes, and snippets.

@brson
Created December 6, 2012 20:28
Show Gist options
  • Save brson/4228030 to your computer and use it in GitHub Desktop.
Save brson/4228030 to your computer and use it in GitHub Desktop.
trait MyIter<A> {
fn myeach(&self, f: &fn() -> bool);
}
impl<A> &[A]: MyIter<A> {
fn myeach(&self, f: &fn() -> bool) { }
}
fn main() {
for [0].myeach { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment