Hello Patrick,

> I would approach it like this, and make full use of Clojure's lazy
> sequences:
>
> (count (take-while belowCount (filter identity (map isInteresting
> pixels))))

Interesting approach - I have not thought of this. Also, it looks that
I can get an array of pixels (as ints) from BufferedImage so it should
be fast.

Thank you for the pointer.

Kind regards,

Vlad

PS: Other option occured to me later - using loop/recur, but I like
the above...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to