jan tolenaar / kiezellisp / index-of-everything

Name

compare

Usage

builtin-function

Syntax

(compare a1 a2)

Description

Compares two numbers, characters, strings, symbols, dates and timespans.

make-html > (compare 3 5)
it: -1
make-html > (compare 3 null)
Cannot compare 3 and null
make-html 1 > (compare "een" "twee")
it: -15
make-html 1 > (compare #\a "a")
Cannot compare #\a and "a"
make-html 2 > (compare (date-time:today) (.add-years (date-time:today) 1))
it: -1