Name

compare

Usage

builtin-function

Syntax

(compare a1 a2)

Description

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

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