I know. Isn't Clojure beautiful? Sigh...

In the docs for 
*partition*<http://clojuredocs.org/clojure_core/clojure.core/partition>, 
it says that partition returns a lazy sequence. And if you look at the 
source section of the docs for 
*some*<http://clojuredocs.org/clojure_core/clojure.core/some> you 
can see that it uses recursion under the hood. So you should be covered 
there.

Thanks for the interesting discussion. =)

On Tuesday, February 18, 2014 11:56:17 AM UTC-8, Laurent Droin wrote:
>
> Wow, that's amazing. Thanks Billy and Johanna. I'm going to try all this 
> tonight.
>
> What I'm not sure of (I don't have a good understanding yet about lazy 
> sequences) is whether or not the sequence given to "some" is lazy or not.
> For example, if I have thousands of parameters but x is <= the first 
> boundary value (i.e. the first element in the sequence), I don't really 
> want to test x against all the other boundary values in the sequence since 
> I already know it's not nil.
> Otherwise, I was thinking I could use recursion, take the two first 
> elements of the sequence, and see if I could conclude. If not, I would call 
> the function again against the rest of the sequence.
>

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to