<div dir="ltr"> Probably a crab would be filled with a sense of personal outrage<div> if it could hear us class it without ado or apology as a crustacean,</div><div> and thus dispose of it. "I am no such thing, it would say: I am</div>
<div style> MYSELF, MYSELF alone."</div><div style><br></div><div style> - William James, The Varieties of Religious Experience</div><div style><br></div><div style><br></div><div style>eq? is a function for letting us distinguish different crabs that would otherwise look the same to us.</div>
<div style><br></div><div style><br></div><div style>Let's say that we have two crabs c1 and c2.</div><div style><br></div><div style><br></div><div style>;;;;;;;</div><div style>;; In BSL:</div><div style>;;;;;;;</div>
<div style><div>(define-struct crab (name))</div><div><br></div><div>(define c1 (make-crab "joe"))</div><div>(define c2 (make-crab "joe"))</div></div><div style><div>;;;;;;;</div><div></div></div><div style>
<br></div><div style><br></div><div style>As it stands, we may want to say they are the same because they "look" the same --- they have the same structural shape. equal? tells us that they look the same.</div>
<div style>
<br></div><div style>;;;;;;</div><div style>> (equal? c1 c2)</div><div style>true</div><div style>;;;;;;</div><div style><br></div><div style><br></div><div style>But as William James notes, these crabs might be outraged at our lack of crustacean discrimination. They may argue: we may look alike, but we are different crabs. How shall we judge?</div>
<div style><br></div><div style>;;;;;;</div><div style>> (eq? c1 c2)</div><div style>false</div><div style>;;;;;;</div><div style><br></div><div style><br></div><div style>A crab is itself, itself alone:</div><div style>
<br></div><div style>;;;;;;</div><div style>> (eq? c1 c1)</div><div style>true</div><div style>;;;;;;</div></div>