class ConsumerList inherits System { item: IStringConsumer; next: ConsumerList; init(value: IStringConsumer, tail: Object) : ConsumerList {{ assert(not (isvoid value), "init", "value argument cannot be void!"); assert(isvoid item, "init", "List has already been initialised!"); item <- value; if isvoid tail then void else case tail of cl: ConsumerList => next <- cl; o: Object => assert(false, "init", "tail argument can be either a ConsumerList or void!"); esac fi; self; }}; push(value: IStringConsumer) : ConsumerList {{ assert(not (isvoid value), "push", "value argument cannot be void!"); if isvoid item then item <- value else if isvoid next then next <- (new ConsumerList).init(value, void) else next.push(value) fi fi; self; }}; find(s: String) : Object {{ assert(not (isvoid item), "find", "list isn't initialised!"); if 0 < item.consume(s) then item else if isvoid next then void else next.find(s) fi fi; }}; };