_aaApply2

Nick Treleaven nick at geany.org
Mon Jul 22 16:00:05 UTC 2024


On Monday, 22 July 2024 at 15:49:54 UTC, IchorDev wrote:
> The struct has one loop value instead of two though, so you 
> have to rewrite code to use `.key` and `.value`, which is not 
> as good as being able to name the key & value yourself. It 
> would’ve been possible for it to be implemented differently 
> though: https://dlang.org/spec/statement.html#front-seq

`front` can't return a tuple, because the range has to store a 
pointer to a value so `front.value` can be mutated.


More information about the Digitalmars-d mailing list