Re: how to get an assignment from a rule ?
- To: mathgroup at smc.vnet.net
- Subject: [mg29328] Re: [mg29315] how to get an assignment from a rule ?
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Thu, 14 Jun 2001 02:27:10 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
on 01.6.13 4:10 PM, Guido Carlet at carlet at sissa.it wrote:
> Anybody knows how to do this in Mathematica ?
I am sure lots of people do.
>
> I have a list of rules:
>
> {a->b, c->d}
>
> and I want to get the corresponding assignments:
>
> a = b
>
> c = d
>
> Is there a command in Mathematica to do this ?
One simple way:
In[1]:=
Set@@@{a->b, c->d}
Out[1]=
{b,d}
Of course the assignments already got evaluated. Indeed:
In[2]:=
{a,c}
Out[2]=
{b,d}
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/
http://sigma.tuins.ac.jp/~andrzej/