Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
I thought defrecords were working OK
(defrecord Foo [a b])
;; => user.Foo
(def example (Foo. 3 (sorted-map :hello 5)))
;; => #'user/example
;; => #:user.Foo{:a 3, :b {:hello 5}}
(def serialized (binding [*print-dup* true] (pr-str example)))
;; => #'user/serialized
;; => "#=(user.Foo/create {:a 3, :b #=(clojure.lang.PersistentTreeMap/create {:hello 5})})"
(read-string serialized)
;; => java.lang.RuntimeException: java.lang.IllegalArgumentException: No matching method found: create (NO_SOURCE_FILE:0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.