Re: Phobos lacks a particular family of range functions...

2016-10-22 Thread Basile B. via Digitalmars-d-learn
On Friday, 21 October 2016 at 19:41:00 UTC, Basile B. wrote: They would have for constraint `if (isInputRange!Range && isInputRange!(ElementType!Range))` In case you wouldn't see directly what would they be used for, it's for tree-like structures. Each element in a Range is also an input

Phobos lacks a particular family of range functions...

2016-10-21 Thread Basile B. via Digitalmars-d-learn
They would have for constraint `if (isInputRange!Range && isInputRange!(ElementType!Range))` In case you wouldn't see directly what would they be used for, it's for tree-like structures. Each element in a Range is also an input range. I see 3 obvious functions/templates - the most