Skip to content

Instantly share code, notes, and snippets.

@Eluss
Created January 24, 2016 12:01
Show Gist options
  • Save Eluss/1b632aad7eaf10d491af to your computer and use it in GitHub Desktop.
Save Eluss/1b632aad7eaf10d491af to your computer and use it in GitHub Desktop.
func countToValue(value: Int) -> SignalProducer<Int, NoError> {
return SignalProducer { (sink, disposable) -> () in
for i in 0...value {
sendNext(sink, i)
}
sendCompleted(sink)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment