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