|
From: Kris K. <kat...@gm...> - 2015-09-01 11:52:52
|
On Tue, Sep 01, 2015 at 11:30:34AM +0100, Stanislav Maslovski wrote: > Hi, > > What should I do to avoid the following behavior? > > (%i1) display2d: false; > (%o1) false > > (%i2) f(x) := x^2; > (%o2) f(x):=x^2 > > (%i3) fun(f, x) := f(x); > (%o3) fun(f,x):=f(x) > > (%i4) fun(sin, x); > (%o4) x^2 > > In %o4 I want sin(x), not x^2. > Here is one way: (%i1) f(x) := x^2$ (%i2) fun(f, x) := apply(f, [x])$ (%i3) fun(sin, x); (%o3) sin(x) Cheers, Kris Katterjohn |