The problem is the ->
macro you are using which inserts the threading value in the first position, right after the fn
symbol.
So this:
(map #(-> % int
(- 48)
(fn [x] (* x x))))
becomes something like:
(map #(fn
(- (int %) 48)
[x]
(* x x)))
That is obviously invalid because fn
expects the first arg to be a vector of function parameters, which is what the error message is trying to say:
fails spec: :clojure.core.specs.alpha/arg-list at: [:args :bs :arity-1 :args] predicate: vector?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…