On Mon, Jul 6, 2009 at 3:58 PM, Emeka <emekami...@gmail.com> wrote: > (defn- subexpressions-of-sum** [[n p] terms] > (let-print [sum (cons '+ (map #(factor-term % n p) terms)) > prod (rest (make-product* n p))] > (cons sum > (map #(cons '* (cons sum (rest %))) > (concat prod (subexpressions-of-product prod)))))) > > I look at the above, and something stupid just entered into my thought. > What happened when this situation occurs (cons sum ())? I hope that's not > possible with your code. >
It shouldn't be. Even if it is, there'd just be some (* sum) in the results, which is inefficient but not illegitimate. I don't see any way that this could be the cause of the ClassFormatError, in particular. Frankly, I am starting to suspect a bug in clojure. I'm using the stable 1.0, not the bleeding edge stuff. Whether the occurrence of the ClassFormatError itself is down to a subtle error in my code (so subtle no-one can spot it) or an error in clojure, its failure to point to a line in my source file as the erroneous one is in and of itself a bug, I'd argue. Since it's not apparently a simple bug in my function above, but something about a combination of that version of that function and some other part of my code, I can't think of a way to track the cause down short of the very tedious method of commenting out functions or replacing them with dummy functions (if they're called by the above function) and seeing which one has the property that commenting it out or dummy-izing it makes the error go away. That will probably take all afternoon, unfortunately; there are dozens of functions and over 1600 lines of code in that source file. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---