From 5fd8236343d7bbf6d1a963771b0c5e5ae5e9f06a Mon Sep 17 00:00:00 2001 From: John Whitington Date: Thu, 10 Sep 2020 18:10:29 +0100 Subject: [PATCH] Fix comment regarding NaN in Array.sort --- stdlib/array.mli | 5 ++--- stdlib/arrayLabels.mli | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/stdlib/array.mli b/stdlib/array.mli index 34eb189e9..6e7aa62e2 100644 --- a/stdlib/array.mli +++ b/stdlib/array.mli @@ -250,8 +250,8 @@ val memq : 'a -> 'a array -> bool instead of structural equality to compare list elements. @since 4.03.0 *) -(** {1 Sorting} *) +(** {1 Sorting} *) val sort : ('a -> 'a -> int) -> 'a array -> unit (** Sort an array in increasing order according to a comparison @@ -259,8 +259,7 @@ val sort : ('a -> 'a -> int) -> 'a array -> unit compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, {!Stdlib.compare} is - a suitable comparison function, provided there are no floating-point - NaN values in the data. After calling [sort], the + a suitable comparison function. After calling [sort], the array is sorted in place in increasing order. [sort] is guaranteed to run in constant heap space and (at most) logarithmic stack space. diff --git a/stdlib/arrayLabels.mli b/stdlib/arrayLabels.mli index baf4b581c..76ce233fd 100644 --- a/stdlib/arrayLabels.mli +++ b/stdlib/arrayLabels.mli @@ -250,8 +250,8 @@ val memq : 'a -> set:'a array -> bool instead of structural equality to compare list elements. @since 4.03.0 *) -(** {1 Sorting} *) +(** {1 Sorting} *) val sort : cmp:('a -> 'a -> int) -> 'a array -> unit (** Sort an array in increasing order according to a comparison @@ -259,8 +259,7 @@ val sort : cmp:('a -> 'a -> int) -> 'a array -> unit compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, {!Stdlib.compare} is - a suitable comparison function, provided there are no floating-point - NaN values in the data. After calling [sort], the + a suitable comparison function. After calling [sort], the array is sorted in place in increasing order. [sort] is guaranteed to run in constant heap space and (at most) logarithmic stack space.