Hi Tomas,

thinking about it, I probably wrote nonsense yesterday:

> If you have a function 'rankClass' which returns the depth where a class
> in the hierarchy is located
>    (de rankClass (Cls)
> ...

The depth does not matter, right?

Instead, the top-level base classes must be compared (you used
'subclass?' respectively 'isa' after all). And, it looks like 'NIL's
must be greater than anything else.

So a function that converts a list like

   ((Cls1) (Cls2))


   (Top1 Top2)


   ((Cls1) NIL)


   (Top1 T)

should do.

This could be done simply with

                  (not L)                       # Make 'T' from 'NIL'
                  (prog                         # Else top level class
                     (while (type (last L))
                        (setq L @) )
                     (last L) ) ) )
            (car Lst) )
      Table )

This assumes that 'Table' is of the form

      (((+Asteroid) (+Asteroid)) (X Y) (prinl "aa"))

so that '(car Lst)' is '((+Asteroid) (+Asteroid))'.

What do you think?

- Alex
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to