I think ks could be weakened to `Iterable[K]` which can be lazy and not something that can anwer `.contains` calls.