ClassCastException in Clojure

后端 未结 2 1206
南笙
南笙 2021-01-25 19:06

I am new to clojure and i have been trying out different programs. Here is my program :

(defn sdsu-reverse [x]
  (loop [n (count x) x x]
  (if (= 0 n)
    (x)
          


        
2条回答
  •  长情又很酷
    2021-01-25 19:52

    class cast exception in your code is because you try to make a list from a constant i.e. (x) so just replace it with x you won't get class cast exception.

提交回复
热议问题