Skip to content

Instantly share code, notes, and snippets.

@ztellman
Last active December 26, 2015 18:09
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ztellman/7192566 to your computer and use it in GitHub Desktop.
Save ztellman/7192566 to your computer and use it in GitHub Desktop.
(defn f []
(-> #{}
(transient)
(conj! -24)
(persistent!)
(conj 0)
(conj 0)
(conj 0)
(conj 0)
(conj 0)
(conj 0)
(transient)
(conj! 23)
(conj! 0)
(conj! 0)
(conj! 0)
(conj! 0)
(conj! 0)
(conj! 0)
(conj! 0)
(conj! 0)
(disj! 23)
(persistent!)
(conj 23)))
(defn g []
(-> {}
(assoc -8 0)
(dissoc 0)
(transient)
(assoc! 7 0)
(dissoc! 0)
(assoc! -1 0)
(dissoc! 0)
(assoc! 0 0)
(assoc! -2 0)
(assoc! -3 0)
(dissoc! -4)
(assoc! 1 0)
(dissoc! 2)
(dissoc! 2)
(assoc! 2 0)
(dissoc! -4)
(dissoc! 3)
(dissoc! 3)
(assoc! 3 0)
(dissoc! -8)
(persistent!)
(dissoc 0)
(dissoc 0)
(assoc -8 0)))
(= (f) (f)) ;; false!
(= (g) (g)) ;; also false!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment