Re: Rules
- To: mathgroup at smc.vnet.net
- Subject: [mg66407] Re: [mg66359] Rules
- From: Adriano Pascoletti <pascolet at dimi.uniud.it>
- Date: Thu, 11 May 2006 02:16:49 -0400 (EDT)
- References: <200605101034.GAA21926@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 10 mag 2006, at 12:34, Marcin Rak wrote: > Hey everyone, > > I had two simple questions, and was wondering wether anyone could > through > something my way: > > 1) When we have a list, call it AList, and we type the following > AList /. {rule1} > AList /. rule1 > what is the difference between the two? From the help for ReplaceAll: expr /. rules applies a rule or list of rules in an attempt to transform EACH SUBPART of an expression expr. so AList /. {rule1} and AList /. {rule1} are equivalent if rule1 is a Rule expression. > And, how would I go about > defining a rule for the variable AList, and a rule for the contents > of the > list - obviously these are two different concepts, yet how would you > differentiate b/w the two? > From the help for Replace: Replace[expr, rules] applies a rule or list of rules in an attempt to transform the ENTIRE expression expr Adriano Pascoletti
- References:
- Rules
- From: Marcin Rak <umrakmm@cc.umanitoba.ca>
- Rules