matchure does some funny things to deal with code size, including generating internals fns which will break recur. core.match avoided this problem until quite recently. We've now added backtracking to control code size for certain kinds of pattern matches. However this also conflicts w/ recur, you've reminded me that we need to use the old compilation strategy in the presence of recur :)
David On Thu, Sep 29, 2011 at 7:08 AM, Christian Pohlmann < chr.pohlm...@googlemail.com> wrote: > Additionally to core.match there is also matchure [1] which comes with > a defn-match that can be used like this: > > (defn-match choose > ([_ 0] 1) > ([0 _] 0) > ([?n ?k] (+ (choose (dec n) (dec k)) (choose (dec n) k)))) > > This makes defining functions fairly close to what you're used from > Haskell. > > [1] https://github.com/dcolthorp/matchure > > Christian > > > On Thu, Sep 29, 2011 at 12:03 PM, Michael Jaaka > <michael.ja...@googlemail.com> wrote: > > Hi! > > > > Is there any way to define function with pattern matching in function > > signature as it is in haskell? > > > > Bye! > > > > -- > > 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 > -- 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