Re: Repeated sequence
- To: mathgroup at smc.vnet.net
- Subject: [mg64000] Re: Repeated sequence
- From: "Borut Levart" <BoLe79 at gmail.com>
- Date: Fri, 27 Jan 2006 05:13:11 -0500 (EST)
- References: <dr80a3$ph3$1@smc.vnet.net><dra3vb$mb6$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I must say I've hoped to get a response with some nice, clean solution, featuring Repeated pattern (p..). I don't think the solution of Jens-Peer Kuska is anywhere near that. Valeri Astanoff mailed me a solution, which I like, even though it's different from what I first imagined: Cases[#, _List] & /@ (list //. {a___, 10, x_?NumericQ, 20, y_?NumericQ, b___} -> {a, {x, y}, b})