The closed interval between $p$ and $q$ is the subposet of $P$ induced by the elements $z$ such that $p \leq z \leq q$. If $p$ and $q$ are incomparable, then an error is thrown.


The object closedInterval is a method function.