Re: need something like ReplaceAllIndexed[]
- To: mathgroup at smc.vnet.net
- Subject: [mg108561] Re: need something like ReplaceAllIndexed[]
- From: dh <dh at metrohm.com>
- Date: Tue, 23 Mar 2010 04:24:13 -0500 (EST)
- References: <hnva5p$88b$1@smc.vnet.net>
Hi Roger, I think the simplest way is using a "slice": t1 = b[a[c], a[c], a[d]]; t2 = {e, f, g}; t1[[All, 1]] = t2; Daniel On 19.03.2010 08:47, divisor wrote: > Hello mathGroup: > > I have an expression like this: > > b[ a[c], a[c], a[d]] > > a list like this: > > {e,f,g} > > I want to end up with > > b[ a[e], a[f], a[g]] > > I think of this as interleaving a list into an expression, but all my > tries with ./,.//,MapIndexed[],MapAt[], Partition[Riffle[]] have come > to no avail. > > Any help on this is greatly appreciated. > > Roger Williams > Franklin Laboratory > http://www.youtube.com/congruentlight > -- Daniel Huber Metrohm Ltd. Oberdorfstr. 68 CH-9100 Herisau Tel. +41 71 353 8585, Fax +41 71 353 8907 E-Mail:<mailto:dh at metrohm.com> Internet:<http://www.metrohm.com>