Bug 11978 – std.algorithm canFind uses "value" where it means "needle"
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-23T08:05:00Z
Last change time
2014-04-22T20:39:18Z
Keywords
pull
Assigned to
andrej.mitrovich
Creator
regan
Comments
Comment #0 by regan — 2014-01-23T08:05:44Z
from std.algorithm:
bool canFind(alias pred = "a == b", R, E)(R haystack, E needle) if (is(typeof(find!pred(haystack, needle))));
Returns true if and only if **value** can be found in range. Performs Ο(needle.length) evaluations of pred.
What is **value** shouldn't that be needle?
Comment #1 by monarchdodra — 2014-01-23T10:34:00Z
Yes, doc is bad. Care to fix it?
Comment #2 by andrej.mitrovich — 2014-04-22T20:13:07Z
I wish the new ddoc parameter check feature found this. I've found a bunch more of these wrongly documented sections.
Comment #3 by github-bugzilla — 2014-04-22T20:39:18Z