summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-10-03 06:39:10 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-10-03 06:39:10 -0700
commit07d1453e93efe2f8098c662a574025a37b2dde61 (patch)
tree66125374da30e42042e251cb7c0d7f817afbfc70
parent9d13183e72a2edd9e54cd582c107d3e3aae29b3a (diff)
downloadtxr-07d1453e93efe2f8098c662a574025a37b2dde61.tar.gz
txr-07d1453e93efe2f8098c662a574025a37b2dde61.tar.bz2
txr-07d1453e93efe2f8098c662a574025a37b2dde61.zip
doc: missing documentation on less over ranges.
* txr.1: Document how the less function operates on ranges, and that ranges rank between numbers and strings on the comparison precedence for dissimilar types.
-rw-r--r--txr.124
1 files changed, 22 insertions, 2 deletions
diff --git a/txr.1 b/txr.1
index 3c8fb136..37c5a4a8 100644
--- a/txr.1
+++ b/txr.1
@@ -15385,12 +15385,32 @@ is the outcome of comparing those differing elements themselves
with
.codn less .
+Two ranges are compared by
+.code less
+using lexicographic logic similar to conses and vectors.
+The
+.code from
+fields of the ranges are first compared. If they are not
+.codn equal ,
+equal then
+.code less
+is applied to those fields and the result is returned.
+If the
+.code from
+fields are
+.codn equal ,
+then
+.code less
+is applied to the
+.code to
+fields and that result is returned.
+
If the two arguments are of the above types, but of mutually different types,
then
.code less
resolves the situation based on the following precedence: numbers and
-characters are less than strings, which are less than symbols,
-which are less than conses, which are less than vectors.
+characters are less than ranges, which are less than strings, which are less
+than symbols, which are less than conses, which are less than vectors.
Note that since
.code nil