From feece6aee2af03d62606a98c3937d205364edbe0 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Mon, 19 Aug 2024 16:09:21 +0200 Subject: [PATCH] Fix another doc comment --- quint/src/util.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/quint/src/util.ts b/quint/src/util.ts index 370d1a694..d9137f0ce 100644 --- a/quint/src/util.ts +++ b/quint/src/util.ts @@ -69,7 +69,12 @@ export function findMap(xs: Iterable, f: (x: X) => Maybe): Maybe return none() } -// 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(array: A[], item: A, cmp: (a: A, b: A) => number): void { if (array.length === 0) { array.push(item)