The add
form is very powerful and very useful for making
groups of objects share some data. The grouping also helps the
designer to see how sets of numbers compare to each other.
In other words, instead of having multiple forms:
(unit-type foo ... (acp-per-turn 3) ...) (unit-type bar ... (acp-per-turn 49) ...) (unit-type baz ... (acp-per-turn 2) ...)
you can say
(add (foo bar baz) acp-per-turn (3 49 2))
to get the same effect.
To get an inheritance-like effect, you can append lists of types together, as in
(define mammal (dog cat cow)) (define bird (hawk eagle condor)) (define animal (append mammal bird fishie))
which results in a list of seven types. It is possible to append different kinds of objects together.