I had only the idea to add more documentation to the project. I have not
thought about new projects. A great benefit is, that a lot of work,
which is needed to figure out the algorithms of functions, gets not
lost.
Nevertheless, I have tried to use a fixed style to write a documentation
of a function.
Important points I think are the description of the valid arguments, the
result, side effects, and which globals affect the function.
The following description is a bit reformatted to fit into a posting and
might be used as a first template:
;;;------------------------------------------------------------------------
;;; PLUSIN (X FM) 27.09.2010/DK
;;;
;;; Arguments and values:
;;; X - a Maxima expression or atom
;;; FM - a list with the terms of an addition
;;; result - part of the list fm, which starts at the inserted
;;; expression
;;;
;;; Description:
;;; Adds X into running list of additive terms FM. The routine
;;; modifies the argument FM destructively, but does not return the
;;; modified list as a result. The return value is a part of the list
;;; FM, which starts at the inserted term. PLUSIN can not handle
;;; Maxima numbers. PLUSIN is called only from the routine PLS.
;;;
;;; Examples:
;;; (setq fm '(0))
;;; (plusin '$a fm) -> ($A)
;;; fm -> (0 $A)
;;; (plusin '$b fm) -> ($B)
;;; fm -> (0 $A $B)
;;; (plusin '$a fm) -> (((MTIMES SIMP) 2 $A) $B)
;;; fm -> (0 ((MTIMES SIMP) 2 $A) $B)
;;;
;;; Side effects:
;;; Modifies destructively the argument FM, which contains the result
;;; of the addition of the argument X into the list FM.
;;;
;;; Affected by:
;;; The option variables $doallmxops and $listarith.
;;;
;;; Notes:
;;; The return value is used in PLS to go in parallel through the
;;; list of terms, when adding a complete mplus-expression into the
;;; list of terms. This is triggered by the flag *PLUSFLAG*, which is
;;; set in PLUSIN, if a mplus-expression is added to the result list.
;;;------------------------------------------------------------------------
Dieter Kaiser