Hi, Am 07.05.2009 um 23:54 schrieb CuppoJava:
But don't you find: (for [:while (Mouse/hasEvent)] (Mouse/getEvent)) much shorter and easier to understand?
Actually: no. I think of for as a way to transform a sequence, not constructing a completely new one. There are constructs like iterate and repeatedly for that. If they are not sufficient, one can drop to lazy-seq. (And sometimes dropping to lazy-seq can yield clearer code than some contorted map filter concat map combination) In fact I think the lazy-seq version is pretty self-explaining. On the other hand I should use for more often. So maybe this view is all wrong. YMMV in the end. Sincerely Meikel
smime.p7s
Description: S/MIME cryptographic signature