Thanks for the replies guys - has given me things to mull over.

On Thursday, 10 May 2012 22:11:18 UTC+1, Ant wrote:
>
> Hi all, 
>
> I am battering my head against the following problem which I'm sure is 
> straightforward if only I knew how. I want to partition the following 
> list: 
>
> '("aa123" "x" "y" "z" "bb123" "ccq23" "3" "yg") 
>
> into the following: 
>
> (("aa123" "x" "y" "z") ("bb123") ("ccq23" "3" "yg")) 
>
> The predicate is: 
>
> #(re-matches #"^(\w)\1.*" %) 
>
> partition-by doesn't work, since it splits the sequence when the 
> result of applying the predicate changes. I want to partition when the 
> predicate becomes a particular value. 
>
> Any clues on how to accomplish this would be gratefully received! 
>
> Thanks, 
>
> Anthony.

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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