Re: Re: How to use Rules on Sequences?
- To: mathgroup at smc.vnet.net
- Subject: [mg29549] Re: [mg29510] Re: How to use Rules on Sequences?
- From: BobHanlon at aol.com
- Date: Sun, 24 Jun 2001 02:01:02 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 2001/6/23 2:39:19 AM, dmueller at mathematik.uni-kassel.de writes: >This works fine for Emil :) >I hat an Idea to have a rule not using any >Context-Function. >But I see, this simply cannot happen in >Mathematica. >So my Problem that x_, y_?Positive, x_ :> SUBST >isn't syntactically correct, has no Importance, >{x__[y___, a_, z___] ->x[y,SUBST,z]} suffices, >because "everything is a Function". > For a rule in which Emil is not explicit: Emil[1,2,3,2,0,a,b,c] //. f_[s___, x_, y_?Positive, x_, e___] :> f[s, x, 0, x, e] Emil[1, 2, 0, 0, 0, a, b, c] Bob Hanlon Chantilly, VA USA