Re: Partition a list into sublists of unequal size
- To: mathgroup at smc.vnet.net
- Subject: [mg83953] Re: Partition a list into sublists of unequal size
- From: Ray Koopman <koopman at sfu.ca>
- Date: Wed, 5 Dec 2007 07:14:56 -0500 (EST)
- References: <fj37cv$hq0$1@smc.vnet.net>
This is a little simpler and maybe a little faster: Take[targetlist,#]& /@ Transpose@{Prepend[Most@#+1,1],#}& @ Flatten@Position[list,1]