[Issue 5894] [patch] std.algorithm.isSorted doesn't handle monotonicity (i.e. "<=")

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 26 15:09:58 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5894


Andrei Alexandrescu <andrei at metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrei at metalanguage.com
         Resolution|                            |INVALID


--- Comment #1 from Andrei Alexandrescu <andrei at metalanguage.com> 2011-04-26 15:06:14 PDT ---
isSorted!pred assesses whether the range has been sorted by using pred. So what
you want is isSorted!"a < b", which will pass [1, 2, 2, 3].

The bug would stand if adjancentFind!"a <= b" would fail.

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


More information about the Digitalmars-d-bugs mailing list