> i'm hoping the "yet" part means it is slated to maybe someday be upgraded?
I've filed a bug and submitted a patch. Assuming my fix is acceptable,
this should be in soon.
https://www.assembla.com/spaces/clojure/tickets/231-deftype-cons-doesn-t-support-maps-
--
You received this message because
>> This seems like a bug to me. Is it?
> As we discussed in #clojure IRC, conj for deftypes does not yet
> support all the flexibility of conj for e.g. hash-maps, in particular,
> the conjing of another map. It does support vectors and map entries.
i'm hoping the "yet" part means it is slated to
On Mon, Dec 28, 2009 at 10:37 PM, Allen Rohner wrote:
> I tried to call merge on a deftype implementing IPersistentMap, and
> got an exception:
>
> user> (deftype Foo [a b] clojure.lang.IPersistentMap)
> #'user/Foo
>
> user> (Foo 1 2)
> #:Foo{:a 1, :b 2}
> user> (merge (Foo 1 2) {:a 3})
> ; Evalua
I tried to call merge on a deftype implementing IPersistentMap, and
got an exception:
user> (deftype Foo [a b] clojure.lang.IPersistentMap)
#'user/Foo
user> (Foo 1 2)
#:Foo{:a 1, :b 2}
user> (merge (Foo 1 2) {:a 3})
; Evaluation aborted.
nth not supported on this type: PersistentArrayMap
[Thro