Modern C++ Lamentations

Guillaume Piolat first.last at gmail.com
Sun Dec 30 13:27:23 UTC 2018


On Sunday, 30 December 2018 at 12:22:01 UTC, John Colvin wrote:
> Or if you can bear the closures
>
>     iota(1, size_t.max)
>         .map!(z => iota(1, z + 1)
>               .map!(x => iota(x, z + 1)
>                     .map!(y => tuple!("x", "y", "z")(x, y, z)))
>               .joiner)
>         .joiner
>         .filter!(t => t.x^^2 + t.y^^2 == t.z^^2);

But this is still unreadable if you are not a D annointed range 
ninja.


More information about the Digitalmars-d mailing list