On 01/01/14 04:32, Patrick Walton wrote:
On 12/31/13 6:52 AM, Huon Wilson wrote:
fn my_pipeline<I: Iterator<T>>(x: I) ->
MapIterator<FilterIterator<I,
what_do_I_write_for_the_function_type_here>, and_again> {
x.filter(|un| boxed).map(|also| unboxed)
}
(where the function/closure is the second param to
{Map,Filter}Iterator.)
Ah, OK. You're right -- in that case you would need to use a struct
and implement `call` manually, unless we had `-> _`.
Patrick
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev
Random thought: if we do get some form of -> _, but people dislike
general return value inference a lot, we could restrict _ in return
values to just anonymous types that can't be written explicitly, e.g.
-> MapIterator<FilterIterator<I, _>, _>
in this case.
Huon
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev