Is there a standard function testing if a sequence starts with a sequence

2009-07-17 Thread samppi
Is there a function in clojure.core or clojure.contrib so that: (and (mystery-fn '(a b c d) '(a b)) (not (mystery-fn '(a b c d) '(a b d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To

Re: Is there a standard function testing if a sequence starts with a sequence

2009-07-17 Thread Mark Engelberg
On Fri, Jul 17, 2009 at 1:32 PM, samppirbysam...@gmail.com wrote: Is there a function in clojure.core or clojure.contrib so that:  (and (mystery-fn '(a b c d) '(a b))        (not (mystery-fn '(a b c d) '(a b d how about something like: (defn mystery-fn [l1 l2] (every? identity (map = l1

Re: Is there a standard function testing if a sequence starts with a sequence

2009-07-17 Thread samppi
Awesome, thanks for the quick answer. I think that it'd be a useful thing to add to seq-utils or something. :) On Jul 17, 1:41 pm, Mark Engelberg mark.engelb...@gmail.com wrote: On Fri, Jul 17, 2009 at 1:32 PM, samppirbysam...@gmail.com wrote: Is there a function in clojure.core or

Re: Is there a standard function testing if a sequence starts with a sequence

2009-07-17 Thread John Harrop
On Fri, Jul 17, 2009 at 4:41 PM, Mark Engelberg mark.engelb...@gmail.comwrote: On Fri, Jul 17, 2009 at 1:32 PM, samppirbysam...@gmail.com wrote: Is there a function in clojure.core or clojure.contrib so that: (and (mystery-fn '(a b c d) '(a b)) (not (mystery-fn '(a b c d) '(a b