MathGroup Archive 2004

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

Search the Archive

Partitioning a list into unequal partitions


Could someone please show me a simple (non-procedural) way of partitioning a
list into 1,2,3 ... n disjoint sublists, where the length of the list is
guaranteed to be correct (i.e. n*(n+1)/2)

I can't see a way, and yet I'm sure there *must* be a one-liner using Fold.

Cheers

Mark R. Diamond





  • Prev by Date: Finding order of a given differential equation and converting a diff. eqn. to matrix form
  • Next by Date: Regarding a 3D plot in mathematica
  • Previous by thread: Finding order of a given differential equation and converting a diff. eqn. to matrix form
  • Next by thread: Re: Partitioning a list into unequal partitions