JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

spork/misc/binary-search-by

spork


    macro
    /usr/local/lib/janet/spork/misc.janet on line 491, column 1

    (binary-search-by x arr f)

    Returns the index of `x` in an array or tuple which has been sorted 
    by a mapping function `f`, or the index of the next item if `x` is 
    not present. This is the correct insert index for `x` within `arr`.


0 examplesSign in to add an example
Loading...