So right now there is no way to implement, say, lock-step iteration of two
containers, without first copying contents of one of them into a vector?

On Mon, Feb 4, 2013 at 12:15 PM, Patrick Walton <[email protected]> wrote:

> On 2/4/13 11:34 AM, Vadim wrote:
>
>> Hi,
>> I saw a post
>> <http://www.reddit.com/r/**programming/comments/17hqg4/a_**
>> little_bit_rusty_practical_**approach_on_rust/c86xyor<http://www.reddit.com/r/programming/comments/17hqg4/a_little_bit_rusty_practical_approach_on_rust/c86xyor>
>> >
>> by Patrick Walton last week on Reddit in which he implied that it is
>> possible to convert Rust enumerator function into a Java-style iterator
>> by applying some magic transformer function to it.   Am I reading this
>> right?   Are there any examples of doing this in Rust?   I can't fathom
>> how that'd be possible without Rust supporting co-routines or, possibly,
>> lazy evaluation, or something like that...
>>
>
> Sorry, I didn't mean to imply that. It's not really possible, except by
> farming out the iteration to a task and sending messages over a channel.
>
> Patrick
>
> ______________________________**_________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/**listinfo/rust-dev<https://mail.mozilla.org/listinfo/rust-dev>
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to