David
Thanks. Nice design!
(extend-type java.util.HashMap
ma/IMatchLookup
(val-at* [this k not-found]
(or (.get this k) not-found)))
2011/12/13 David Nolen :
> You can extend-type to IMatchLookup.
>
> David
>
>
> On Mon, Dec 12, 2011 at 10:56 AM, Takahiro Hozumi
> wrote:
>>
>>
You can extend-type to IMatchLookup.
David
On Mon, Dec 12, 2011 at 10:56 AM, Takahiro Hozumi wrote:
> Hi,
>
> I'd like to use core.match with java.util.HashMap without converting
> into {}.
> The core.match doesn't support it as below.
>
> (let [m (java.util.HashMap. {"a" 1})]
>(match m
>
Hi,
I'd like to use core.match with java.util.HashMap without converting
into {}.
The core.match doesn't support it as below.
(let [m (java.util.HashMap. {"a" 1})]
(match m
{"a" 1} true))
;=> nil
Is it difficult?
Thanks.
--
You received this message because you are subscribe