There's no way to make that work currently. Whether it should work requires
some discussion but at the moment I'm inclined to say no.
On Wednesday, November 14, 2012, David Jagoe wrote:
Hi all,
I have a core.match pattern that looks something like this:
(def !nil? (complement nil?))
Hey David,
I guess its got something to do with the fact that match itself is a macro?
Correct. The match macro just takes the list `(!nil? a)`, which isn't
a valid match form, so it complains about it.
Is there some other way that I could extend match to only match when the
variable is not
Hey Carlo,
Excellent, thank you very much! I haven't tried it yet but it looks good.
Cheers,
David
On 15 November 2012 00:20, Carlo Zancanaro carlozancan...@gmail.com wrote:
Hey David,
I guess its got something to do with the fact that match itself is a
macro?
Correct. The match macro
Hi all,
I have a core.match pattern that looks something like this:
(def !nil? (complement nil?))
(match [*a* *b*]
[(a :guard !nil?) nil] (dosomething a)
[nil (b :guard !nil?)] (dosomething b)
[(a :guard !nil?) (b :guard !nil?)] (dosomething a b)
:else (throw (Exception. Not