Many thanks to all of you. I have several working implementations right now and I'm feeling enlightened ;-)
On Dec 22, 5:19 pm, Chouser <chou...@gmail.com> wrote: > On Mon, Dec 22, 2008 at 10:23 AM, Piotr 'Qertoip' Włodarek > > <qert...@gmail.com> wrote: > > > (defn multiplication-row [n k] > Nothing wrong there, though the #() reader macro is handy for building > map functions: Nice tip. > > This also does not work - throws > > java.lang.UnsupportedOperationException: Can only recur from tail > > position (hello_world.clj:47) - why?: > > > (defn pretty-print-row [row] > > (if (first row) > > ((print (first row)) > > (recur (rest row))))) > > > Once I remove print expression, exception is not thrown (what the > > heck?) > > You probably mean: > > (defn pretty-print-row [row] > (if (first row) > (do > (print (first row)) > (recur (rest row))))) Exactly. Regards, Piotrek --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---