Re: How to swap two elements of a list
- To: mathgroup at smc.vnet.net
- Subject: [mg127590] Re: How to swap two elements of a list
- From: Diana Mecum <diana.mecum at gmail.com>
- Date: Sun, 5 Aug 2012 14:58:54 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <jvklja$643$1@smc.vnet.net>
***, Thank you for getting back to me. I had a little difficulty describing what I was trying to do. I start with a list which begins as follows: {2,3,4,5,7,8,9,11,13,16,17,19,23,25,27,29,31 Now, I want to swap the 2 with the 4, the 3 with the 8, the 5 with the 9. "2" is the first element of SWAP LIST 1. "4", which I want to swap with "2" is the first element of SWAP LIST 2. "3" is the second element of SWAP LIST 1. "8", which I want to swap with "3" is the second element of SWAP LIST 2. And, so on. The resulting list is {4,8,2,9,16,3,5,25,27,7,32,49,64,11,13,81,121 Hope this is more clear. Diana
- Follow-Ups:
- Re: How to swap two elements of a list
- From: Diana Mecum <diana.mecum@gmail.com>
- Re: How to swap two elements of a list
- From: Andrzej Kozlowski <akozlowski@gmail.com>
- Re: How to swap two elements of a list
- From: Ulrich Arndt <ulrich.arndt@data2knowledge.de>
- Re: How to swap two elements of a list