(binary-insert n coll)(binary-insert comp n coll)Returns a new collection with n inserted into sorted coll
so as to keep it sorted. If comp not provided, uses compare.
Returns a new collection with `n` inserted into sorted `coll` so as to keep it sorted. If `comp` not provided, uses compare.
(binary-search-insertion-point n coll)(binary-search-insertion-point comp n coll)(binary-search-insertion-point comp n lower-bound upper-bound coll)Return the index at which to insert n into sorted coll,
using binary search. If comp not provided, uses compare.
Return the index at which to insert `n` into sorted `coll`, using binary search. If `comp` not provided, uses compare.
(fn->comparator f)Given a fn that might be boolean valued or a comparator, return a fn that is a comparator.
Given a fn that might be boolean valued or a comparator, return a fn that is a comparator.
(insert coll n i)Returns a new collection with n inserted at index i into coll.
Returns a new collection with `n` inserted at index `i` into `coll`.
(jacobsthal n)Return the nth Jacobsthal number (0-indexed)
Return the nth Jacobsthal number (0-indexed)
(pending-element-order n)Indexes to insert bs at, given n to insert (0-indexed)
Indexes to insert `b`s at, given `n` to insert (0-indexed)
(sort coll)(sort comp coll)Returns a sorted sequence of the items in coll, using the merge-insertion sorting algorithm.
If comp not provided, uses compare.
Returns a sorted sequence of the items in coll, using the merge-insertion sorting algorithm. If `comp` not provided, uses compare.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |