‘pairs’ library function.