MathGroup Archive 2009

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

Search the Archive

part assigned sequence behavior puzzling

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105228] part assigned sequence behavior puzzling
  • From: mkr <mileskrains at gmail.com>
  • Date: Wed, 25 Nov 2009 02:31:06 -0500 (EST)

I am puzzled by the following behavior:

tmp = Range[15]
tmp[[7]] = Sequence @@ Range[2];
tmp[[7]] = Sequence @@ Range[2];
tmp[[7]] = Sequence @@ Range[2];
tmp

yields

{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
{1, 2, 3, 4, 5, 6, 1, 2, 8, 9, 10, 11, 12, 13, 14, 15}

I would have expected the repeated assignment to have a repeated
effect, thus obtaining

{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
{1, 2, 3, 4, 5, 6, 1, 2, 2, 2, 8, 9, 10, 11, 12, 13, 14, 15}

Where/why am I wrong?


  • Prev by Date: Re: Batch save mode?
  • Next by Date: Re: Not all points plot on my graph...
  • Previous by thread: Re: simple question
  • Next by thread: Re: part assigned sequence behavior puzzling