Auto recursive function
Martin Nowak via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jan 11 11:55:44 PST 2017
On Wednesday, 11 January 2017 at 19:39:17 UTC, Ali Çehreli wrote:
> return choose(lengths.length == 1, one!T(alloc,
> lengths[0]), two!T(alloc, lengths));
Well, choose is the right tool when the choice can only be made
at runtime. That would be uncommon for dimensionality.
Anyhow mentioning ndslice for multi-dim seems like the sanest tip
here.
https://github.com/libmir/mir
More information about the Digitalmars-d-learn
mailing list