In Scheme, the primitive eq? tests whether its arguments are the same object. For example, in the following list
(define lst
(let (x (list \'a
There's lots of approaches.
Eq and Ord instances regardless of the contained type.reallyUnsafePtrEquality# but you should understand what's really unsafe about it before you use it!See also this answer about avoiding equality checks altogether.