You probably don't want to be doing this.  Your function looks like it could
use a lazy sequency and a filter.

e.g. (doseq [e (filter odd? [1 2 3 4 5 6 7])] (prn e))

You can get a long way with partition, for, filter and reduce;  It is a pain
to get your head around it at first if your are not used to it (well, it
was/is for me) but it is worth the effort, the functional programming
chapter in Stuart Halloway's book is a very good start.

Cheers

Tom


2009/2/20 BerlinBrown <berlin.br...@gmail.com>

> For example, I do that a lot, where I loop through a file and then
> want to call a function on one particular line string.
>
> (defn my-func [line no]
>  ...
>  ...
>
> -----------
>
> (defun something....
>    (loop [srch-res? (. lm find) line-no 0]
>      (when srch-res?
>       ************
>        (my-func (. lm group) line-no)
>      ***********
>
>        (recur (. lm find) (+ line-no 1))))))
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to