Hi Qian,
Patch 1 basically moves all of the function definitions from
IndexedList to List (except, minIndex and maxIndex). Maybe maxIndex can
even be avoided, because it is inherited from the default implementation
of LinearAggregate.
https://github.com/hemmecke/fricas/blob/master-hemmecke/src/algebra/aggcat.spad#L1831
I first was a bit sceptical about such a move, because IndexedList
seemed more general to me than List, but, in fact, this patch removes an
interdependency between List and IndexedList (List is currently used in
IndexedList).
I first thought that this patch would be problematic, but seemingly all
index related functions like elt etc. are implemented by category
defaults, so Qian's suggestion works.
Patch 2
In general I like the removal of unnecessary macros and their
replacement by actual function calls. The Lisp reference is still
concentrated in one place (at the beginning).
Maybe, I would reorder the function definition so that all references to
Lisp and all pretend's come first, i.e. move the elt and setelt!
functions further down.
Ralf