Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

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?


  • Prev by Date: Re: Re: Re: Re: finding package inExtraPackages`Enhancements`
  • Next by Date: finding out what Automatic was
  • Previous by thread: Re: rotation matrix to Yaw-Pitch-Roll angles
  • Next by thread: Re: rules and lists