kibit icon indicating copy to clipboard operation
kibit copied to clipboard

Suggests to pass macro to reduce (reduce and true [true false])

Open andrusieczko opened this issue 9 years ago • 0 comments

Hi,

When you have the following code:

(reduce #(and %1 %2) true [true false])

this will complain:

Consider using:
  and
instead of:
  #(and %1 %2)

But unfortunately you can't use (reduce and true [true false]):

CompilerException java.lang.RuntimeException: Can't take value of a macro: #'clojure.core/and, compiling:(NO_SOURCE_PATH:1:1) 

Thanks, Karol

andrusieczko avatar Oct 01 '15 08:10 andrusieczko