Comparing to the Combine publisher(for:) API:
// where player is an AVPlayer
let cancellable = player.publisher(for: \.rate)
.sink { rate in
// "rate" here isn't optional, just like the property on AVPlayer
}
// this library:
for element in player.sequence(for: \.rate) {
// element.newValue here is optional :/
// element also has an oldValue property,
// which the Combine counterpart doesn't surface
}
Comparing to the Combine
publisher(for:)API: