Skip to content

Commit

Permalink
Fix another doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Aug 19, 2024
1 parent 1985fef commit feece6a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion quint/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ export function findMap<X, Y>(xs: Iterable<X>, f: (x: X) => Maybe<Y>): Maybe<Y>
return none<Y>()
}

// Insert an item into an array sorted in ascending order by the given comparator.
/** Insert an item into an array sorted in ascending order by the given comparator.
*
* Important: The array must be sorted in ascending order.
*
* Complexity: O(log n)
*/
export function insertSorted<A>(array: A[], item: A, cmp: (a: A, b: A) => number): void {
if (array.length === 0) {
array.push(item)
Expand Down

0 comments on commit feece6a

Please sign in to comment.