MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Partition a list into sublists of unequal size


This is a little simpler and maybe a little faster:

  Take[targetlist,#]& /@ Transpose@{Prepend[Most@#+1,1],#}& @
    Flatten@Position[list,1]


  • Prev by Date: Re: Insert a Math Symbol in Text in Notebook?
  • Next by Date: Adding coloured Polygon to a BarChart
  • Previous by thread: Re: Partition a list into sublists of unequal size
  • Next by thread: Re: Partition a list into sublists of unequal size