Motive behind !empty() with front() instead of Optional front()

Paul Backus snarwin at gmail.com
Mon Apr 5 20:38:33 UTC 2021


On Monday, 5 April 2021 at 20:33:44 UTC, Per Nordlöw wrote:
> On Monday, 5 April 2021 at 20:11:07 UTC, Paul Backus wrote:
>> The `optional` package on dub [1] has some examples in its 
>> documentation.
>
> Thanks. What about adding these algorithms to std.sumtype?

Optional implements the standard range interface, so the 
algorithms it uses are the existing ones in std.algorithm.


More information about the Digitalmars-d mailing list