使用0作为参数调用take-nth会导致OutOfMemoryError,或许这里需要一个大于0的验证?
要重现问题,
user=> (take-nth 0 [1 2])
OutOfMemoryError Java heap space
reply.eval-modes.nrepl/session-responses (nrepl.clj:51)
reply.eval-modes.nrepl/session-responses (nrepl.clj:51)
reply.eval-modes.nrepl/session-responses/fn--1340 (nrepl.clj:56)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:51)
clojure.lang.RT.seq (RT.java:535)
clojure.core/seq--5467 (core.clj:139)
clojure.core/filter/fn--5962 (core.clj:2826)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:58)
clojure.lang.RT.seq (RT.java:535)
clojure.core/seq--5467 (core.clj:139)
Bye for now!
Error printing return value (OutOfMemoryError) at clojure.core/take-nth (core.clj:4289).