January 27, 2014 Re: std.copy (to multiple output ranges), | ||||
---|---|---|---|---|
| ||||
On Mon, 27 Jan 2014 15:44:43 +0100, Robert Schadek wrote:
> I'm searching the docs for something similar to:
> copy(someInputRange, firstOutputRange, secondOutputRange, ....);
> I know how to write it by hand, but I'm suspecting that something like
> this is already in phobos.
>
> And secondly, is there some function that gives me a forward range to some input range?
Curiously, copy doesn't implement multiple output ranges. I don't think there's any reason it couldn't. I think an enhancement request is in order.
Turning an InputRange into a ForwardRange implies buffering, std.array.array is a general solution.
|
January 27, 2014 Re: std.copy (to multiple output ranges), | ||||
---|---|---|---|---|
| ||||
Posted in reply to Justin Whear | On 01/27/2014 07:59 PM, Justin Whear wrote: > On Mon, 27 Jan 2014 15:44:43 +0100, Robert Schadek wrote: > >> I'm searching the docs for something similar to: >> copy(someInputRange, firstOutputRange, secondOutputRange, ....); >> I know how to write it by hand, but I'm suspecting that something like >> this is already in phobos. >> >> And secondly, is there some function that gives me a forward range to some input range? > Curiously, copy doesn't implement multiple output ranges. I don't think there's any reason it couldn't. I think an enhancement request is in order. thats what I thought > > Turning an InputRange into a ForwardRange implies buffering, std.array.array is a general solution. |
Copyright © 1999-2021 by the D Language Foundation