Something like this?:
declare(union,nary)$
listofops(expr) := block([inflag:true], if mapatom(expr) then {} else
adjoin(op(expr),xreduce(union,maplist(listofops,expr))))$
inflag:true uses the internal form for efficiency; be aware that
listofops(-a/b) => {"*","^"} (from (-1)*a*b^(-1)) instead of {"-","/"}
(from -(a/b) ).
-s
On Thu, Oct 20, 2011 at 15:17, Edwin Woollett <woollett at charter.net> wrote:
> Maxima has listofvars to produce a list of
> variables.
>
> I would like a listofops to produce a list
> of ops, so I can easily survey an expression
> and see if it contains any special functions.
>
> Ted
>
>
> ______________________________**_________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>
>