package vocal
Module Vocal.ArraysSource
Additional operations on arrays
search for value v in array a, between indices fromi inclusive and toi exclusive, using comparison function cmp. Returns an index where v occurs, or raises Not_found if no such index exists.
search for value v in array a, between indices fromi inclusive and toi exclusive, using comparison function cmp. If v occurs in a, returns an index immediately to the left of the set of occurrences of v. Otherwise, returns an index where to insert v.
search for value v in array a, between indices fromi inclusive and toi exclusive, using comparison function cmp. If v occurs in a, returns an index immediately to the right of the set of occurrences of v. Otherwise, returns an index where to insert v.
sort array a betweens indices fromi inclusive and toi exclusive using a binary insertion sort. Time complexity is quadratic, but number of comparisons is only linearithmic.