Looking for some help related to Combine...

My app has a PhraseModel object that includes multiple WordModel objects (each word publishes a currentWord value)
I now want to add a pipeline that will eventually include debouncing, and possibly even network calls. But for now, I just want to verify that I can declare a basic CombineLatest operator and create a subscriber that fires anytime one of the words changes.
(should this exist in the model object? or in the View?)

Currently, I don't seem to be able to get my basic baby steps code to compile. (problems in the code below around line 10 and line 24.)
I'd be grateful for any high level or low level help on this. I feel like I've read fairly extensively, but nothing I've come across seems to apply perfectly to what I'm doing. (in particular the example at the 26 minute mark of video 721 from wwdc2019 feels tantalizing close. alas it doesn't seem to compile either.)

thanks, in advance,
Mike
Code Block
class WordModel: ObservableObject {
    @Published var currentWord: String
    init(word: String) {
        self.currentWord = word
    }
}
class PhraseModel: ObservableObject {
    let leftWord = WordModel(word: "myLeft")
    let rightWord = WordModel(word: "myRight")
    var phraseChangedPublisher: AnyPublisher<String, Never> {
        return CombineLatest(leftWord.$currentWord, rightWord.$currentWord)
            .map{(leftWord, rightWord) -> String
                return leftWord + rightWord
            }
    }
}
struct PhraseView: View {
    @ObservedObject var model: PhraseModel
    var body: some View {
        HStack {
            Text(model.leftWord.currentWord)
            Text(model.rightWord.currentWord)
        }
        .onReceive(model.phraseChangedPublisher, perform: {
            print("hello")
        })
    }
}

hmm, some progress. things compile now that i've changed phraseChangePublisher to this:
Code Block
    var phraseChangedPublisher: AnyCancellable {
        Publishers.CombineLatest(leftWord.$currentWord, rightWord.$currentWord)
            .map({
                return $0.0 + $0.1
            })
            .debounce(for: 1.0, scheduler: RunLoop.main)
            .sink { someValue in
                print("someValue: \(someValue)")
            }
        }

Is AnyCancellable the best way to proceed here?
At this point the pipeline wasn't firing, even when the words were changing.
When I added the following ivar in my View:
Code Block
    let pipeline: AnyCancellable
    init(model: PhraseModel) {
        self.model = model
        self.pipeline = model.phraseChangedPublisher
    }

the pipeline code runs and behaves as expected. However when I change body to the following:
Code Block
    var body: some View {
        HStack {
            Text(model.leftWord.currentWord)
            Text(model.rightWord.currentWord)
        }
            .onReceive(pipeline, perform: {_ in
                print("hello")
            })
    }

I get a compile error at line2: "Unable to infer complex closure return type; add explicit type to disambiguate"
Any guidance on how to improve this?
(heavy sigh)
Looking for some help related to Combine...
 
 
Q