Created
August 27, 2013 15:41
-
-
Save saosebastiao/6355253 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn member<T>(elem: T, vec: ~[T]) -> bool { | |
for vec.iter().advance |vec_elem| { | |
if elem == *vec_elem { return true; } | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment