Skip to content

Instantly share code, notes, and snippets.

@onmyway133
Created July 4, 2018 14:32
Show Gist options
  • Save onmyway133/0b11700e498cebae4082cc498f9a8f72 to your computer and use it in GitHub Desktop.
Save onmyway133/0b11700e498cebae4082cc498f9a8f72 to your computer and use it in GitHub Desktop.
let signal = PullSignal<String> { completion in
// There should be some long running operation here
completion(Result.value(value: "test"))
}
signal.map { value in
value.count
}.start { event in
if case let .value(value) = event {
print(value)
} else {
print("error")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment