Re: Q:efficient list operation wanted
- To: mathgroup at smc.vnet.net
- Subject: [mg14023] Re: Q:efficient list operation wanted
- From: mefisher at my-dejanews.com
- Date: Wed, 16 Sep 1998 14:12:03 -0400
- Organization: Deja News - The Leader in Internet Discussion
- References: <6ten6q$3ii@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <6ten6q$3ii at smc.vnet.net>,
Allan Hayes <hay at haystack.demon.co.uk> 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
mark.fisher at atl.frb.org
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum