summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-12 02:05:05 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-12 02:05:05 -0800
commit3fb9836753f7685a5ce31bb67212cbb5b5c7dcad (patch)
tree2c72d6d3d7f5df61228cba6772ee35af35d5bbfb /txr.1
parent4b3e69561390df2a67d7a7752890718da1eab5a1 (diff)
downloadtxr-3fb9836753f7685a5ce31bb67212cbb5b5c7dcad.tar.gz
txr-3fb9836753f7685a5ce31bb67212cbb5b5c7dcad.tar.bz2
txr-3fb9836753f7685a5ce31bb67212cbb5b5c7dcad.zip
* hash.c (hash_equal_op, hash_hash_op): New static functions.
(hash_ops): New functions registered in table of operations. * txr.1: Documentation for equal function updated to explain how two hashes are equal.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.137
1 files changed, 25 insertions, 12 deletions
diff --git a/txr.1 b/txr.1
index 976b4c34..795170c9 100644
--- a/txr.1
+++ b/txr.1
@@ -6347,18 +6347,31 @@ the same numeric value, eql returns t, even if they are different objects.
For all other objects, eql behaves like eq.
The equal function is less strict than eql. In general, it recurses into some
-kinds of aggregate objects to perform a structural equivalence. If <left-obj>
-and <right-obj> are eql then they are also equal. If the two objects are both
-cons cells, then they are equal if their "car" fields are equal and their "cdr"
-fields are equal. If two objects are vectors, they are equal if they have the
-same length, and their corresponding elements are equal. If two objects are
-strings, they are equal if they are textually identical. If two objects are
-functions, they are equal if they have equal environments, and if they have
-equal functions. Two compiled functions are the same if they are the same
-function. Two interpreted functions are equal if their list structure is equal.
-
-For some aggregate objects, there is no special semantics. Two hashes,
-symbols, packages, or streams are equal if they are the same hash.
+kinds of aggregate objects to perform a structural equivalence.
+
+If <left-obj> and <right-obj> are eql then they are also equal.
+
+If the two objects are both cons cells, then they are equal if their "car"
+fields are equal and their "cdr" fields are equal.
+
+If two objects are vectors, they are equal if they have the same length, and
+their corresponding elements are equal.
+
+If two objects are strings, they are equal if they are textually identical.
+
+If two objects are functions, they are equal if they have equal environments,
+and if they have equal functions. Two compiled functions are the same if they
+are the same function. Two interpreted functions are equal if their list
+structure is equal.
+
+Two hashes are equal if they use the same equality (both are equal-based,
+or both are the default eql-based), if their user-data elements are equal, if
+their sets of keys are identical, and if the data items associated with
+corresponding keys from each respective hash are equal objects.
+
+For some aggregate objects, there is no special semantics. Two arguments
+which are symbols, packages, or streams are equal if and only if they
+are the same object.
Certain object types have a custom equal function.