Created
August 19, 2013 23:19
-
-
Save carl-eastlund/6275344 to your computer and use it in GitHub Desktop.
map over iterator
This file contains hidden or 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 imap<A,B>( i : ~Iterator<A>, f : &fn(A)->B ) { i.map(f) } | |
| fn main () {} | |
| /* | |
| iter.rs:1:50: 1:60 error: type `~std::iterator::Iterator<A>:Send` does not implement any method in scope named `map` | |
| iter.rs:1 fn imap<A,B>( i : ~Iterator<A>, f : &fn(A)->B ) { i.map(f) } | |
| ^~~~~~~~~~ | |
| error: aborting due to previous error | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment