February 02, 2015 Re: std.algorithm sort() and reverse() confusion | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | Jonathan M Davis:
>> arr.reverse.map!sqrt
>
> Yes, but arguably, chaining calls in this case is bad,
We have discussed this some time... and I'd like reverse() to return the original array (like the deprecated array .reverse property). It's not a perfect design, but allowing UFCS chains is quite important.
Bye,
bearophile
|
Copyright © 1999-2021 by the D Language Foundation