equivalence.texi (1018B)
1 @c -*-texinfo-*- 2 @setfilename ../src/equivalence 3 4 @node Equivalence, Symbols, Booleans, Top 5 @comment node-name, next, previous, up 6 7 @chapter Equivalence 8 @cindex equivalence 9 10 Kernel has two general-purpose equivalence predicates (whereas R5RS 11 Scheme has three). The two Kernel predicates correspond to the 12 abstract notions of equivalence up to mutation (@code{equal}) and 13 equivalence in the presence of mutation (@code{eq?}). 14 15 @deffn Applicative eq? (eq? . objects) 16 Predicate @code{eq?} returns true iff all of @code{objects} are 17 effectively the same object, even in the presence of mutation. 18 @c todo maybe add more content here, specific to klisp 19 @end deffn 20 21 @deffn Applicative equal? (equal? . objects) 22 Predicate @code{equal?} returns true iff all of @code{objects} 23 ``look'' the same as long as nothing is mutated. This is a weaker 24 predicate than @code{eq?}; that is, @code{equal?} must return true 25 whenever @code{eq?} would return true. 26 @c todo maybe add more content here, specific to klisp 27 @end deffn