Skip to content

Instantly share code, notes, and snippets.

@max6363
Last active January 20, 2022 12:24
Show Gist options
  • Save max6363/6399c5efc834c23db94304b23296e4aa to your computer and use it in GitHub Desktop.
Save max6363/6399c5efc834c23db94304b23296e4aa to your computer and use it in GitHub Desktop.
[1, 2, 3]
.publisher
.sink(receiveCompletion: { completion in
switch completion {
case .failure(let error):
print("Something went wrong: \(error)")
case .finished:
print("Received Completion")
}
}, receiveValue: { value in
print("Received value \(value)")
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment