Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Partitioning lists

  • To: mathgroup at
  • Subject: [mg20439] Partitioning lists
  • From: "DIAMOND Mark" <noname at>
  • Date: Tue, 26 Oct 1999 00:33:17 -0400
  • Organization: The University of Western Australia
  • Sender: owner-wri-mathgroup at

I would like a function f to split a list as follows

f[a] =

I can do this as

      Table[{Take[a, i], Drop[a, i]}, {i, 1, Length[a] - 1}]

but it *looks* as though it is very inefficient. Is it?
It also looks as though there should be a way of using Partition simply to
chop a list between positions i and i+1, but
I cannot see how to do it. Any suggestions?

mark diamond
no spam email: markd at psy dot uwa dot edu dot au

  • Prev by Date: How to select all cells ABOVE a given cell?
  • Next by Date: rotation matrix to Yaw-Pitch-Roll angles
  • Previous by thread: How to select all cells ABOVE a given cell?
  • Next by thread: Re: Partitioning lists