Bug 11798 – std.algorithm.all with no predicate too
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-22T04:44:00Z
Last change time
2013-12-28T02:20:51Z
Assigned to
monarchdodra
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2013-12-22T04:44:12Z
I suggest to add an overload to std.algorithm.all, that works with no predicate:
void main() {
import std.algorithm: all;
auto bools = [true, false, true];
auto result = bools.all;
}
Currently you have to write code like:
auto result = bools.all!q{ a };
Comment #1 by monarchdodra — 2013-12-22T14:09:32Z
Seems like a legit request to me, and is trivial to implement. I'm on it. ditto for "any" of course :)