If the input is always going to be sorted, consider using a sorted-set or similar collection type to hold it in the first place.
If you're going to need to refer to a particular subsequence repeatedly, and it's held in a vector, you might also consider using subvec after using loop/recur to find the start and end indices. -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a language for a more civilized age. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. 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
