rules and lists
- To: mathgroup at smc.vnet.net
- Subject: [mg54226] rules and lists
- From: Erich Neuwirth <erich.neuwirth at univie.ac.at>
- Date: Sun, 13 Feb 2005 22:17:15 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I would like to replace sublists of a list to be replaced by another list, such that for example the rule {1,2}->{1,2,3} wout tranform {1,2,3,3,1,2} into {1,2,3,3,3,1,2,3} Simply gibbin the transformation rule in the form {x___,1,2,y___}->{x,1,2,3,y} does not work. What is the idiom to do what I want?