title: Combine @Published property send values also when not updated
body: <p>I was trying to create a dynamic Form using SwiftUI and Combine, that loads options of an input (in the example, <code>number</code>) based on another input (in the example, <code>myString</code>).</p>
  
  <p>The problem is that the Combine stack get executed continuously, making lots of network requests (in the example, simulated by the delay), even if the value is never changed. </p>
  
  <p>I think that the expected behavior is that <code>$myString</code> publishes values only when it changes.</p>
  
  <pre><code>class MyModel: ObservableObject {
  
      // My first choice on the form
      @Published var myString: String = "Jhon"
  
      // My choice that depends on myString
      @Published var number: Int?
  
      var updatedImagesPublisher: AnyPublisher&lt;Int, Never&gt; {
          return $myString
              .removeDuplicates()
              .print()
              .flatMap { newImageType in
                  return Future&lt;Int, Never&gt; { promise in
  
                      print("Executing...")
  
                      // Simulate network request
                      DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) {
                          let newNumber = Int.random(in: 1...200)
                          return promise(.success(newNumber))
                      }
                  }
          }
          .receive(on: DispatchQueue.main)
          .eraseToAnyPublisher()
      }
  }
  
  struct ContentView: View {
  
      @ObservedObject var model: MyModel = MyModel()
  
      var body: some View {
          Text("\(model.number ?? -100)")
              .onReceive(model.updatedImagesPublisher) { newNumber in
                  self.model.number = newNumber
              }
      }
  }
  </code></pre>