JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

spork/misc/insert-sorted-by

spork


    function
    /usr/local/lib/janet/spork/misc.janet on line 518, column 1

    (insert-sorted-by arr f & xs)

    Insert elements in `arr` such that it remains sorted by the value 
    returned when `f` is called with the element, comparing the values 
    with `<`. If `arr` is not sorted beforehand, the results are 
    undefined. Returns `arr`.


0 examplesSign in to add an example
Loading...