From: Robert D. <rob...@gm...> - 2025-01-04 07:35:20
|
Eduardo, try this. (displa-def $aaa dimension-nary ":") (displa-def $bbb dimension-match "<" ">") (defun reform-ccc (form) (list '($bbb) (cons '($aaa) (rest form)))) (defun dimension-ccc (form result) (let* ((reformed (reform-ccc form)) (helper (get (caar reformed) 'dimension))) (funcall helper reformed result))) (setf (get '$ccc 'dimension) 'dimension-ccc) Put that in a file, let's say "displa-ccc.lisp", and then say load("displa-ccc.lisp") in your Maxima session. When I try that, I get: (%i1) load ("displa-ccc.lisp"); (%o1) displa-ccc.lisp (%i2) ccc(a,b,c); (%o2) <a:b:c> (%i3) ccc(1,2,3,4); (%o3) <1:2:3:4> The main idea is to rework the ccc expression to be bbb(aaa(...)) within the display function for ccc, and display that using display properties defined for aaa and bbb. Hope this helps, Robert |