How to dynamically build a list of rules
- To: mathgroup at smc.vnet.net
- Subject: [mg109136] How to dynamically build a list of rules
- From: janitor048 <janitor048 at googlemail.com>
- Date: Mon, 19 Apr 2010 04:09:37 -0400 (EDT)
Hi there!
I need a somewhat larger list of substitution rules along the line of
subs = { name1 -> SomeFunction[name1], name2 ->
SomeFunction[name2], ... , nameN -> SomeFunction[nameN]}
Obviously typing that by hand can become a little annoying. So I would
like to have that list created dynamically, via Table[ ... ] or
something the like.
The problem is, I can't figure out the correct syntax for this task.
"name1" etc. are just, well, names (variable names to be specific).
Unfortunately I haven't been able to find a solution on the web so
far. Any suggestions?
Cheers,
Oliver
- Follow-Ups:
- Re: How to dynamically build a list of rules
- From: Ingolf Dahl <ingolf.dahl@physics.gu.se>
- Re: How to dynamically build a list of rules