Even though in retrospect it seems quite clear, I still had to check the source here: The effort of ord_selectchk is still O(n), the same like selectchk.
|Did you know ...||Search Documentation:|
:- use_module(library(ordsets)).(can be autoloaded)
select(Item, Set1, Set2)and Set1, Set2 are both sorted lists without duplicates. This implementation is only expected to work for Item ground and either Set1 or Set2 ground. The "chk" suffix is meant to remind you of memberchk/2, which also expects its first argument to be ground.
ord_selectchk(X, S, T)