Skip to content

Commit 4178507

Browse files
authored
Merge pull request #5432 from jihchi/sync-belt-doc-headers_sortarraystring
Sync docs for `belt_SortArrayString.mli`
2 parents fbd0c82 + 45bfce0 commit 4178507

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

jscomp/others/belt_SortArrayString.mli

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
(* ```res prelude
2+
* type element = string
3+
* ```
4+
*)
15

26
# 2 "others/sort.cppo.mli"
37
(* Copyright (C) 2017 Authors of ReScript
@@ -25,8 +29,9 @@
2529
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2630

2731

28-
(** This is a specialized module for [`Belt_SortArray`](), the docs in that module also
29-
applies here, except the comparator is fixed and inlined
32+
(**
33+
This is a specialized module for `Belt.SortArray`, the docs in that module also
34+
applies here, except the comparator is fixed and inlined.
3035
*)
3136

3237
# 34 "others/sort.cppo.mli"
@@ -35,35 +40,34 @@ type element = string
3540
# 39 "others/sort.cppo.mli"
3641
val strictlySortedLength: element array -> int
3742
(**
38-
The same as [`Belt_SortArray.strictlySortedLength`]() except the comparator is fixed
43+
The same as `Belt.SortArray.strictlySortedLength` except the comparator is fixed.
3944
40-
**return** `+n` means increasing order `-n` means negative order
45+
Returns `+n` means increasing order `-n` means negative order.
4146
*)
4247

4348

4449
val isSorted: element array -> bool
45-
(** `sorted xs` return true if `xs` is in non strict increasing order *)
50+
(** `isSorted(xs)` return true if `xs` is in non strict increasing order. *)
4651

4752
val stableSortInPlace: element array -> unit
4853
(**
49-
The same as [`Belt_SortArray.stableSortInPlaceBy`]() except the comparator is fixed
54+
The same as `Belt.SortArray.stableSortInPlaceBy` except the comparator is fixed.
5055
*)
5156

5257
val stableSort: element array -> element array
53-
(** The same as [`Belt_SortArray.stableSortBy`]() except the comparator is fixed *)
58+
(** The same as `Belt.SortArray.stableSortBy` except the comparator is fixed. *)
5459

5560
val binarySearch: element array -> element -> int
5661
(**
57-
If value is not found and value is less than one or more elements in array,
58-
the negative number returned is the bitwise complement of the index of the first element
62+
If value is not found and value is less than one or more elements in array, the
63+
negative number returned is the bitwise complement of the index of the first element
5964
that is larger than value.
6065
61-
If value is not found and value is greater than all elements in array,
62-
the negative number returned is the bitwise complement of
63-
(the index of the last element plus 1)
66+
If value is not found and value is greater than all elements in array, the negative
67+
number returned is the bitwise complement of (the index of the last element plus 1)
6468
65-
for example, if `key` is smaller than all elements return `-1` since `lnot (-1) = 0`
66-
if `key` is larger than all elements return `- (len + 1)` since `lnot (-(len+1)) = len`
69+
for example, if `key` is smaller than all elements return `-1` since `lnot(-1) = 0`
70+
if `key` is larger than all elements return `- (len + 1)` since `lnot(-(len+1)) = len`.
6771
*)
6872

6973
(**/**)

0 commit comments

Comments
 (0)