MathGroup Archive 1998

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

Search the Archive

Re: Q:efficient list operation wanted

In article <6ten6q$3ii at>,
  Allan Hayes <hay at> wrote:
> L1 = {1,2,3,4,5,3,7,2,3,9} ;
> L2 = {a, b, c};
> L1[[Flatten[Position[L1,3]]]]= L2;
> L1
> {1,2,a,4,5,b,7,2,c,9}

I like it, but I don't understand the logic of the evaluation of the
lhs. Is this non-standard? Why does the evaluation of the lhs
apparently stop at Part[L1, {3,6,9}]? Did earlier versions of
Mathematica behave this way?

mark.fisher at

-----== Posted via Deja News, The Leader in Internet Discussion ==-----   Create Your Own Free Member Forum

  • Prev by Date: Re: list referencing with [[]][[]]
  • Next by Date: Linear Algebra and Matrix Manipulation Archives?
  • Previous by thread: Re: Q:efficient list operation wanted
  • Next by thread: Symbolic Matrix Inversion -- What's the best method for Rank under 100?