How do you safely deal with range.front?

Seb seb at wilzba.ch
Fri Dec 29 20:11:03 UTC 2017


On Friday, 29 December 2017 at 19:38:44 UTC, aliak wrote:
> Hi,
>
> So when I'm dealing with ranges, there're a number of times 
> where I get the front of the returned result of a set of 
> operations, but of course there is no front so you get an 
> runtime access error.
>
> [...]

Do you know about the proposed `orElse`?

https://github.com/dlang/phobos/pull/5154


More information about the Digitalmars-d-learn mailing list