Why tuples are not ranges?

Ali Çehreli acehreli at yahoo.com
Sat Jun 30 13:56:07 UTC 2018


On 06/30/2018 05:17 AM, Steven Schveighoffer wrote:

> Isn't this what only does? https://dlang.org/phobos/std_range.html#only

Cool. :)

     import std.range : only;

     auto t = tuple(5, 3.5, false);
     auto r = only(t.expand);

Ali


More information about the Digitalmars-d-learn mailing list