(defn matrix-diagonals-odd-p
([matrix] (matrix-diagonals-odd-p matrix 0))
([matrix offset]
(let [len (alength matrix)]
(if (> (+ (bit-shift-right len 1) (bit-and len 1)) offset)
(if (= (+ (bit-and (get (get matrix offset) offset) 1)
(bit-and (get (get matrix (- len 1 offset)) (- len 1 offset)) 1)
(bit-and (get (get matrix offset) (- len 1 offset)) 1)
(bit-and (get (get matrix (- len 1 offset)) offset) 1)) 4)
(recur matrix (inc offset))
false) true))))
我得到java.lang.UnsupportedOperationException: Can only recur from tail position
但是这个是尾部位置。为什么/给出了什么?
答案 0 :(得分:1)
这适用于Clojure 1.3和1.4。也许在同一个命名空间中还有其他功能导致问题?