         default:()
         }
     }
+    
+    func pageIndex(_ index: PageIndex, isNextTo other: PageIndex) -> Bool {
+        return index - other == 1 || other - index == 1
+    }
 }

                                               completion: nil)
                })
            } else {
                switch updateBehavior {
                    
                case .scrollToUpdate:
                    scrollToPage(.at(index: sanitizedIndex), animated: true)
                    
                case .scrollTo(let index):
                    scrollToPage(.at(index: index), animated: true)
                    
                default:()
                }
            }
        })

            guard let currentIndex = self.currentIndex else {
                return
            }
            guard let newViewController = dataSource?.viewController(for: self, at: index) else {
                assertionFailure("Expected to find inserted UIViewController at page \(index)")
                return
