On Thu, May 28, 2009 at 7:58 AM, Daniel Lyons <fus...@storytotell.org> wrote:
>
>
> 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.

Except if one of them is a prefix of the other.

(some (complement zero?) (map compare [1 2 3] [4 5 6])) => true
(some (complement zero?) (map compare [1 2 3] [1 2 3])) => nil
(some (complement zero?) (map compare [1 2 3] [1 2])) => nil

-- 
Michael Wood <esiot...@gmail.com>

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