Extended classify-by-reacheability by accepting next, previous nad selector-p arguments