title: Swift Combine removeDuplicates() not working as expected
body: <p>I am trying to filter only .portrait and .landscape orientation 
  and then apply distinctUntilChanged i.e. removeDuplicates() </p>
  
  <p>But removeDuplicates() seems to be never called as my debugger never stops inside comparator </p>
  
  <p>and onReceive callback is called. </p>
  
  <pre><code> // MARK: - Publishers
      private var orientationChange = NotificationCenter.default.publisher(for: UIDevice.orientationDidChangeNotification)
          .map { toOrientation($0) }
          .filter { filterOrientation($0) }
          //.removeDuplicates()
          .removeDuplicates(by: { o1, o2 in
             _ = filterOrientation(o1)
             _ = filterOrientation(o2)
              return false
          })
          .receive(on: DispatchQueue.main)
  </code></pre>
  
  <p>How to allow only .portrait, .landscape, .portrait, .landscape sequences 
  and not .portrait, .portrait, .landscape etc </p>
  
  <p><strong>Update</strong> </p>
  
  <p>I need to use this, but it adds unnecessary boilerplate code:</p>
  
  <pre><code>.onReceive(orientationChange) { orientation in
                  guard orientation != self.lastOrientation else { return }
                  self.lastOrientation = orientation
  </code></pre>
  
  <p>}</p>
  
  <p>Here are internal implementations of helper functions</p>
  
  <pre><code>fileprivate func toOrientation(_ notification: UIKit.Notification) -&gt; UIDeviceOrientation {
      (notification.object as? UIDevice)?.orientation ?? .unknown
  }
  
  fileprivate func filterOrientation(_ orientation: UIDeviceOrientation, orientations: [UIDeviceOrientation] = [.landscapeLeft, .landscapeRight, .portrait, .portraitUpsideDown]) -&gt; Bool {
  
      return orientations.contains(orientation)
  }
  </code></pre>