Hi Michael On Fri, Sep 30, 2011 at 4:51 PM, Michael Jaaka <michael.ja...@googlemail.com > wrote:
> Btw. I'm using [match "0.2.0-SNAPSHOT"] and Clojure 1.3 but this > import instruction > > (use '[match.core :only [match]]) > > from official website of match library doesn't work, only (use > '[clojure.core.match.core :only [match ] ]) works > Thanks, fixed. > > and I have given a try to matchure and IT WORKS ;-) > Good to hear :) > But why do I have to define question character as a prefix on > destruction variables? > This doesn't help in any way and I doubt that is helps matchure too. > >From the perspective of core.match, some trickery is involved to know whether to create a new local binding, or to perform an equals test. We look at the surrounding scope at compile time to determine this. Another way would be for the user to provide such information, which seems to be the way matchure has gone, with prefix ? (speculative, I don't actually know the reasons behind the decision) Example: (core.match) (let [x [1 2 3] a 1 b 2 ] (match [x] [[b a c & as]] :first ;; b and a are local, perform = test, create new binding c [[a b c & as]] :second ;; same, but successful match )) Thanks, Ambrose -- 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