MathGroup Archive 1995

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

Search the Archive

Re: question: {a,b,c}->{{a,b},{b,c}}??

  • Subject: [mg2506] Re: question: {a,b,c}->{{a,b},{b,c}}??
  • From: Christian.Jost at (Christian Jost)
  • Date: Wed, 15 Nov 1995 07:00:07 GMT
  • Approved:
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Universite Paris-Sud XI
  • Sender: daemon at ( )

In article <DHtHo7.2pr at>, "Bart van der Zwet"
<B.W.v.d.Zwet at> wrote:

> Hello,
> I'm working on a problem in which I have to substitute a list,
> for instance {a,b,c,d} by the other list {{a,b},{b,c},{c,d}}.
> I've managed to solve it for a given length of the first list, by
> using the substitution-rule :
> {a_,b_,c_} -> {{a,b},{b,c}}      (this for a list of three elements)
> I would like to find out how this can be done for a list of arbitrary
> length.
Just use the Partition command (Mathematica book page 131)

{{a, b}, {b, c}}

Hope that helps, Christian.

Christian Jost, Universit Paris-Sud XI, Orsay, France
jost at

  • Prev by Date: Re: turn off symbols in MultipleListPlot?
  • Next by Date: Re: changing defaults under Mma 2.2.2 for Windows????
  • Previous by thread: RE: question: {a,b,c}->{{a,b},{b,c}}??
  • Next by thread: Re: question: {a,b,c}->{{a,b},{b,c}}??