Hi, Am 05.04.2009 um 06:59 schrieb David Sletten:
My example is decidedly non-functional (I don't really like that term...My code works--it does function! :-) ).
Maybe one should use non-functional for - well - non-functional code and disfunctional for not working code?
I was more curious about the general case, but you guys may be right that nested loops just aren't needed.
My experience in the general case: If I found myself in need for a 'break' or 'continue', it would have been better to put the undesired values not in the loop in the first place. For example in the break case: (doseq [x some-thing] (... (when (foo x) (break)) ...) ; hypothetical.. would be (doseq [x (take-while (complement foo) some-thing)] (...)) ; working For continue to skip a value, one can use filter/remove. This probably doesn't help for all cases, but I've yet to find such a case for me. (Maybe a sign my projects aren't very involved at the moment.) Sincerely Meikel
smime.p7s
Description: S/MIME cryptographic signature