location location::span(position b, unsigned n) { return location(b, position(b.row(), b.col() + n)); }
bool position::operator<(const position &other) const { if (row() < other.row()) return true; if (row() > other.row()) return false; return col() < other.col(); }