Given
f(x):=3*x^2;
a:f("alpha");
What kind of object is a
? I tried testing with stringp
and symbolp
and anything similar I could find (though I couldn't find a comprehensive list).
I also used to_lisp()
to run (inspect $a)
but Maxima just hung. When I stopped it, it said that it was a "proper list of length 3" but listp(a)
comes back false.
Maxima is happy to evaluate functions with string arguments instead of symbols, and the result an ordinary Maxima expression. You can see that via grind(a)
which will show "alpha"
in the place of x
.
Maxima can do some operations on expressions which contain strings instead of symbols, e.g. "foo" + "foo"
simplifies to 2*"foo"
, and you can say subst("foo"=123, <whatever>)
to replace "foo" with a value. However, a string cannot have a value, so "foo": 123
fails. Also, strings cannot have properties.