...
Code Block |
---|
/** Abstract list structure. */
abstract class IntList {
}
/* Concrete empty list structure containing nothing. */
class EmptyIntList extends IntList {
}
/** Concrete non-empty list structure containing an int, called first, and a rest,
* which is a list structure. */
class ConsIntList extends IntList {
int first;
IntList rest;
}
|
...