MathGroup Archive 2008

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

Search the Archive

How to produce variable substitution list?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90904] How to produce variable substitution list?
  • From: Stoney Ballard <stoneyb at gmail.com>
  • Date: Tue, 29 Jul 2008 01:37:48 -0400 (EDT)

Is there a straight-forward way to write a function that takes a list
of symbols that are bound in the calling environment and produce a
list such as is produced by Solve, like {var1->val1, var2->val2,...}?

Currently, I'm using an expression (not a function) like {Hold[var1]-
>var1, Hold[var2]->var2}, which produces the right result, but it
looks bad to duplicate the symbols. I want something that looks clean,
like bindings[var1, var2,...].

I know this isn't lisp, and there's no binding environment as such,
but it would expect this to be doable.

TIA for any suggestions.

 - Stoney



  • Prev by Date: Re: Cube root of -1 and 1
  • Next by Date: Adding assumptions to SOLVE
  • Previous by thread: Re: evaluations in Plot in Manipulate?
  • Next by thread: Re: How to produce variable substitution list?