www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11978] New: std.algorithm canFind uses "value" where it means "needle"

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11978

           Summary: std.algorithm canFind uses "value" where it means
                    "needle"
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: websites
        AssignedTo: nobody puremagic.com
        ReportedBy: regan netmail.co.nz


--- Comment #0 from Regan Heath <regan netmail.co.nz> 2014-01-23 08:05:44 PST
---
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?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 23 2014
parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11978


monarchdodra gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra gmail.com


--- Comment #1 from monarchdodra gmail.com 2014-01-23 10:34:00 PST ---
Yes, doc is bad. Care to fix it?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 23 2014