Details
-
New Feature
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
Description
In PUP-8603, the functions min and max are added. For backwards compatibility reasons they must continue to compare values with unwanted/strange automatic type conversion. In order to give users a sane alternative those functions will accept a lambda to enable taking over the responsibility to compare. To facilitate that, a compare(a,b) function should be added that returns -1, 0, 1 depending on the order of the values.
In addition, when compare is given two strings, it should accept a third Boolean argument to control if string comparison ignores case (true - by default), or not.