the naive version would look like
```d
auto next(Range)(Range r) {
r.popFront;
return r.front;
}
```
But looking at a mature library e.g.
https://github.com/submada/btl/blob/9cc599fd8495215d346ccd62d6e9f1f7ac140937/source/btl/vector/package.d#L229
is looks like there should be tons of
On Wednesday, 15 June 2022 at 13:52:24 UTC, Christian Köstlin
wrote:
looks like there should be tons of annotations/attributes on it.
Because you have a template function, most attributes will be
inferred based on the Range type. `const` is not inferred, but
`popFront` mutates so it doesn't a
On Wednesday, 15 June 2022 at 13:52:24 UTC, Christian Köstlin
wrote:
the naive version would look like
```d
auto next(Range)(Range r) {
r.popFront;
return r.front;
}
```
But looking at a mature library e.g.
https://github.com/submada/btl/blob/9cc599fd8495215d346ccd62d6e9f1f7ac140937/so
On Wednesday, 15 June 2022 at 17:30:31 UTC, JG wrote:
On Wednesday, 15 June 2022 at 13:52:24 UTC, Christian Köstlin
wrote:
the naive version would look like
```d
auto next(Range)(Range r) {
r.popFront;
return r.front;
}
```
But looking at a mature library e.g.
https://github.com/subma
On 2022-06-15 19:36, JG wrote:
On Wednesday, 15 June 2022 at 17:30:31 UTC, JG wrote:
On Wednesday, 15 June 2022 at 13:52:24 UTC, Christian Köstlin wrote:
the naive version would look like
```d
auto next(Range)(Range r) {
r.popFront;
return r.front;
}
```
But looking at a mature librar