Howdy,

I'm looking to patch core.match. There are a couple of cases where the
pattern matcher eliminates rows (basically, if you're pattern matching
against a Map, a row containing a map that has all wildcards will be
considered a "wildcard" row and all the subsequent rows will be removed).
Here's a couple of tests that fail:

(deftest map-pattern-match-bind-2
  (is (= (let [xqq {:cz 1 :dz 2}]
           (match [xqq]
             [{:z a :zz b}] [:a0 a b]
             [{:cz a :dz b}] [:a2 a b]
             :else []))
        [:a2 1 2])))

(deftest map-pattern-match-bind-3
  (is (= (let [xmm {:bz 2}]
           (match [xmm]
             [{:az a}] [:a0 a]
             [{:bz b}] [:a1 b]
             :else []))
        [:a1 2])))

I've been reading through the core.match code to try to fix the code so
that map matches are not treated as wildcards. As far as I can tell, if I
add a magic null guard into specialize-map-pattern-row, then the row will
not be treated as a wildcard... but my attempts to add a guard have been
less than successful. Any help or pointers would be greatly appreciated.

Thanks,

David

-- 
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to