Calling ev() during function definition



Thanks for your help, Rupert and Stavros.

On Wed, 22 Sep 2010, Stavros Macrakis wrote:

> The way to do that is
>
>    define(h(x), f(x)/g(x) )

> Equivalently, you can write
>
>    h(x) := ''(f(x)/g(x))
>
> which evaluates the contents of ''( ... ) at the time of function
> definition, but I think 'define' is clearer.

You're probably right, but with the search and replace facility on a
text editor, it's easier to change lots of instances of function :=
ev(expr) to function := ''(expr) than to define(function, expr).

Although in the end, I'm probably going to settle on function :=
ratsimp(''(expr))

-- 

Thanks again,

Dan