2011/12/29 Erlis Vidal <er...@erlisvidal.com> > Hi guys, > > I've using Clooj and following the labrepl but I'm hitting a wall right > now. How can I debug here? > > This the code I want to debug > > (defn min-1 [x & more] > (loop [min x > more (seq more)] > (if-let [x (first more)] > (recur (if (< x min) x min) (next more)) > min))) > > This is suppose to return the min value but it's not, It's returning me > the same sequence I'm passing: > > student.dialect=> (min-1 [1 2 3]) > [1 2 3] > > Even if you find the problem, don't forget to let me know how can I debug > here, so I can do it the next time > > Hello,
I don't know how to do that with Clooj. Just wanted to let you know that with Counterclockwise ( Eclipse plugin ), you place a breakpoint on the if-let line, start in debugging mode, and the thread stops at the breakpoint, the "debug" perspective shows up, and the "Variables" view reveals that the 'min' variables contains a PersistentVector, where you'd expect a number => You're calling min-1 in the wrong way, you should have called it like (min-1 1 2 3), or (apply min-1 [1 2 3]) Cheers, Laurent > Thanks > Erlis > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en