Colin on Nostr: #commonlisp Equality (defstruct foo a) (defparameter *a* (make-foo :a 1)) ...
#commonlisp Equality
(defstruct foo
a)
(defparameter *a* (make-foo :a 1))
(defparameter *b* (make-foo :a 1))
(eq *a* *b*) ;; NIL
(eql *a* *b*) ;; NIL
(equal *a* *b*) ;; NIL
(equalp *a* *b*) ;; T
Published at
2024-07-02 10:31:21Event JSON
{
"id": "567d2891dbe11d63f12ed799fe757865a0fc5bedc0872071415199cd3bf36bdb",
"pubkey": "5692c32f4f13c4bcfe0bec0c4b5ab9090655b0f966e4eb62660f2dd598eb1c17",
"created_at": 1719916281,
"kind": 1,
"tags": [
[
"t",
"commonlisp"
],
[
"proxy",
"https://emacs.ch/users/fosskers/statuses/112716433427631510",
"activitypub"
]
],
"content": "#commonlisp Equality\n\n(defstruct foo\n a)\n\n(defparameter *a* (make-foo :a 1))\n(defparameter *b* (make-foo :a 1))\n\n(eq *a* *b*) ;; NIL\n(eql *a* *b*) ;; NIL\n(equal *a* *b*) ;; NIL\n(equalp *a* *b*) ;; T\n",
"sig": "1e5242da71daac9f129e9eddec10e6f1b3cb7181e5fffbbf8b40194b9e1e98b1ef7751e1b14ccdbaf395b105f75c25c059705369c313c45ebc5f8d71feabef96"
}