[CONTRIB-102] clojure.contrib.core/-?> (and perhaps others?) have a quoting bug Created: 07/Dec/10 Updated: 09/Jan/11
|Reporter:||Jason Wolfe||Assignee:||Laurent Petit|
1.2 and 1.3
When called via a namespace-qualified symbol and given three or more arguments, -?> gives the error:
user=> (clojure.contrib.core/-?> 1 inc inc)
|Comment by Alan Malloy [ 07/Dec/10 11:27 PM ]|
Root cause is in clojure.contrib.core/defnilsafe, so similar functions like .?. will have the same problem. I futzed around for a while to try and figure it out, but defnilsafe is a little too meta for me. The problem is, predictably enough once you've glanced at the code, with ~'~nil-safe-name.
The general solution ought to look like
But I couldn't make it quite work.
|Comment by Laurent Petit [ 08/Dec/10 2:14 AM ]|
Simple patch where I specifically use fully qualified names when calling defnilsafe.
|Comment by Alan Malloy [ 09/Jan/11 4:23 AM ]|
What about this patch instead? It makes sure to resolve the symbols supplied to defnilsafe while still within the c.c.core namespace.
I also made the arglists a bit less ugly.