Re: Got NullpointerException when using loop/recur/let together

2017-10-25 Thread Matching Socks
Also, have another look at '(ret (- time-now start-time)) It will yield a list containing the symbol 'ret and a nested list containing the symbol '- etc etc etc. I think what you expected was a vector of two numbers. -- You received this message because you are subscribed to the Google

Re: Got NullpointerException when using loop/recur/let together

2017-10-24 Thread Justin Smith
you wrap a call to Thread/sleep in parens, in clojure this means you want to call it, Thread/sleep returns nil and calling nil gives a NullpointerException Parens are not for grouping or sequencing things in clojure, and you don't need them here - fn has an implicit do block already, in other

Got NullpointerException when using loop/recur/let together

2017-10-24 Thread yihao yang
Hi, all I want to do sth. like query until timeout. So I write a function below. (defn wait-ls-ready [] (let [pair-fn (fn [] ( (Thread/sleep 1000) (let [ret (try (c/exec :ls)