JanetDocsI'm feeling luckyGitHub sign in

compare



    function
    boot.janet on line 733, column 1

    (compare x y)

    Polymorphic compare. Returns -1, 0, 1 for x < y, x = y, x > y
    respectively. Differs from the primitive comparators in that it first
    checks to see whether either x or y implement a `compare` method
    which can compare x and y. If so, it uses that method. If not, it
    delegates to the primitive comparators.


0 examplesSign in to add an example
Loading...