core.match - matching missing map values

2012-05-25 Thread David McNeil
I expected this to match, but it did not.

(clojure.core.match/match [{}]
[{:x (x :when nil?)}]
[match x])
;;= nil

Instead, I was able to make this work:

(clojure.core.match/match [{}]
[{:x (x :when #(= :clojure.core.match/not-found 
%))}]
[match x])
;;= [match nil]

I am curious: is this by design?

Thanks.
-David McNeil

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: core.match - matching missing map values

2012-05-25 Thread David Nolen
There's a ticket for this. Patches welcome.

I've been busy with ClojureScript related things so I haven't given
core.match much attention recently. core.match is very alpha status -
importantly it does not work with AOT. I would not rely on it for anything
critical until I or someone else gets to these kinds of issues.

On Fri, May 25, 2012 at 2:02 PM, David McNeil mcneil.da...@gmail.comwrote:

 I expected this to match, but it did not.

 (clojure.core.match/match [{}]
 [{:x (x :when nil?)}]
 [match x])
 ;;= nil

 Instead, I was able to make this work:

 (clojure.core.match/match [{}]
 [{:x (x :when #(=
 :clojure.core.match/not-found %))}]
 [match x])
 ;;= [match nil]

 I am curious: is this by design?

 Thanks.
 -David McNeil

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en