I would like to tell Maxima how to format a particular lisp
struct. I notice that for lisp list expressions there are
some hooks that I don't understand. eg in nset.lisp.
An example is the graph package:
(%i68) (display2d:false, clebsch_graph());
(%o68) ?GRAPH\(16\ vertices\,\ 40\ edges\)
(%i69) (display2d:true, clebsch_graph());
(%o69) GRAPH(16 vertices, 40 edges)
(%i70)
But, in particular, I am thinking of a struct with two slots
that represents a maxima expression. If expr is a lisp list
then the first slot is (car expr), the second is (cdr expr)
copied to an array.
The easiest is to convert the expression back to a list for
printing. But sometimes, I want some indication of the
representation.
I can load a modified msize that tests with typep if the
argument is this struct and converts it to a list. This is
simple and seems fool-proof, but makes the array representation
invisible. Also something like this does not belong at the top
of msize, but somewhere down below the msize-atom code, I suppose.
Maybe this is a complicated problem...
John Lapeyre