sclass UpDownSequence is IntSize { BitBuffer moves; // up is true void add(UpDown move) { moves.add(move.bit); } toString { ret join(countIteratorAsList moveChar(size())); } S moveChar(int i) { ret moves.get(i) ? "U" : "D"; } public int size() { ret moves.size(); } }