On Sun, Jul 27, 2014 at 9:20 PM, H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On Sun, Jul 27, 2014 at 07:42:17PM -0700, Timothee Cour via
Digitalmars-d-learn wrote:
Just for clarification, I wanted 'myrange.at(i)' to be the same as
Just for clarification, I wanted 'myrange.at(i)' to be the same as
`myrange.dropExactly(i).front`
(so I don't assume it's a random access range).
myrange.dropExactly(i).front makes it much more obvious what you're
doing and that it's inefficient. It might be necessary in some cases, but
we don't
On Sun, Jul 27, 2014 at 07:42:17PM -0700, Timothee Cour via Digitalmars-d-learn
wrote:
Just for clarification, I wanted 'myrange.at(i)' to be the same as
`myrange.dropExactly(i).front`
(so I don't assume it's a random access range).
myrange.dropExactly(i).front makes it much more obvious
On Saturday, 26 July 2014 at 00:28:32 UTC, Ary Borenszweig wrote:
No, the OP said the meaning was `myrange.dropExactly(i).front`,
which is not a random access.
Sometimes you *do* want the n-th element of a range even if the
range is not a random access.
What he did also say is he wanted the
Is there a function for doing this?
myrange.at(i)
(with meaning of myrange.dropExactly(i).front)
it's a common enough operation (analog to myrange[i]; the naming is from
C++'s std::vectorT::at)
On Friday, 25 July 2014 at 21:33:23 UTC, Timothee Cour via
Digitalmars-d-learn wrote:
Is there a function for doing this?
myrange.at(i)
(with meaning of myrange.dropExactly(i).front)
it's a common enough operation (analog to myrange[i]; the
naming is from
C++'s std::vectorT::at)
That would
On 7/25/14, 6:39 PM, Jonathan M Davis wrote:
On Friday, 25 July 2014 at 21:33:23 UTC, Timothee Cour via
Digitalmars-d-learn wrote:
Is there a function for doing this?
myrange.at(i)
(with meaning of myrange.dropExactly(i).front)
it's a common enough operation (analog to myrange[i]; the naming is
On Saturday, 26 July 2014 at 00:28:32 UTC, Ary Borenszweig wrote:
On 7/25/14, 6:39 PM, Jonathan M Davis wrote:
On Friday, 25 July 2014 at 21:33:23 UTC, Timothee Cour via
Digitalmars-d-learn wrote:
Is there a function for doing this?
myrange.at(i)
(with meaning of myrange.dropExactly(i).front)