(1) Is there a simpler way to define pairwise, which takes an existing sequence and then returns its items a pair at a time?
(defn pairwise [& seq] (map vector (take-nth 2 seq) (take-nth 2 (rest seq)))) (2) When writing a function like pairwise, are there any bright-line rules about whether to use variable arity? Cheers, Stuart --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---