Hi all,
I was wondering how to define a second order function in maxima, i.e. a
function returning a function.
More concrete: I want to define a function make_fn(n) which should return a
function fn(x), where the way in which fn(x) is computed depends on the
initially provided n.
I tried it as follows:
make_fn(n) := lambda([x],n+x)$
fn3: make_fn(3)
but this evaluates to lambda([x], x + n), whereas I want it to evaluate to
lambda([x], x + 3)
Thanks, Joachim.