Created
July 4, 2018 14:32
-
-
Save onmyway133/0b11700e498cebae4082cc498f9a8f72 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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