Hi, I have a little snippet of Java code that I want to express in Clojure. But all my attempts thus far have been much more unreadable than the equivalent Java. Some help would be greatly appreciated.
d and w are arrays of integers, d: [0 0 0 0 0 1 1 1 1 2 2 3 3 3 3 3 4 4 ... ] w: [1 2 3 1 4 1 2 2 1 4 5 1 2 1 3 3 1 1 ... ] int doc = -1; for(int i=0 i<w.length; i++){ //Load doc if not already loaded if(doc != d[i]){ doc = d[i]; load(doc); } //Stop if doc is malformed if(malformed(doc)) break; //Process word process(doc, w[i]); } Thank a lot for your help and insight. -Patrick -- 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