From 56fec159a8e435fd66b6b0dad6022968a6fe34e6 Mon Sep 17 00:00:00 2001 From: "Arthur A. Gleckler" Date: Wed, 7 Oct 2020 09:45:05 -0700 Subject: copy edit --- srfi-flexvectors.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srfi-flexvectors.html b/srfi-flexvectors.html index a1c0af3..3626b21 100644 --- a/srfi-flexvectors.html +++ b/srfi-flexvectors.html @@ -235,7 +235,7 @@ zot
(flexvector-skip number? (flexvector 1 2 'a 'b 3 4 'c 'd))
;=> 2
 
(flexvector-skip-right number? (flexvector 1 2 'a 'b 3 4 'c 'd))
;=> 4

(flexvector-binary-search fv value cmp [start [end]])

-

Similar to flexvector-index and flexvector-index-right, but, instead of searching left-to-right or right-to-left, this performs a binary search. If there is more than one element of fv that matches value in the sense of cmp, flexvector-binary-search may return the index of any of them.

+

Similar to flexvector-index and flexvector-index-right, but instead of searching left-to-right or right-to-left, this performs a binary search. If there is more than one element of fv that matches value in the sense of cmp, flexvector-binary-search may return the index of any of them.

The search is performed on only the indexes of fv between start, which defaults to 0, and end, which defaults to the length of fv. Both start and end are clamped to the range [0, (flexvector-length fv)]. It is an error if end is less than start.

cmp should be a procedure of two arguments that returns either a negative integer, which indicates that its first argument is less than its second; zero, which indicates that they are equal; or a positive integer, which indicates that the first argument is greater than the second argument. An example cmp might be:

(λ (char1 char2)
  (cond ((char<? char1 char2) -1)
        ((char=? char1 char2) 0)
        (else 1))) 
-- cgit 1.4.1