funcool/cats

lift-a produces an exception when n is (inc 1) but not when n is 2

luminusian opened this issue · 1 comments

((m/lift-a 2 +) [1] [2])
=> [3]
((m/lift-a (inc 1) +) [1] [2])
CompilerException java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to java.lang.Number

It seems possible to remove n from parameters of lift-a and instead infer n from when the function is applied to arguments.
lift-a may be a function instead of a macro.