>> I wonder if there is a more idiomatic way to compare two lazy
>> sequences... lazily?
You can just use =.

(= seq1 seq2)

It works lazily.

user> (= (iterate inc 0) (map #(do (println %) %)  [0 1 2 -3 4 5 6]) )
0
1
2
-3
false

How sweet!

2009/5/28 Daniel Lyons <fus...@storytotell.org>:
>
>
> On May 27, 2009, at 11:51 PM, Timothy Pratley wrote:
>> I wonder if there is a more idiomatic way to compare two lazy
>> sequences... lazily?
>
> I came up with (some (complement zero?) (map compare list-1 list-2))
> in my response which missed yours by seconds. :) I'm not sure it's
> great but it does seem to work.
>
> —
> Daniel Lyons
> http://www.storytotell.org -- Tell It!
>
>
> >
>

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