Fixes warnings in playgrounds.

This commit is contained in:
Krunoslav Zaher 2015-12-19 15:16:29 +01:00
parent eb3f308648
commit 23b5f4e04a
2 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@ Specialty Observables that have more precisely-controlled subscription dynamics.
func sampleWithoutConnectableOperators() {
let int1 = interval(1, MainScheduler.sharedInstance)
let int1 = interval(1, scheduler: MainScheduler.sharedInstance)
_ = int1
.subscribe {
@ -48,7 +48,7 @@ func sampleWithMulticast() {
print("Subject \($0)")
}
let int1 = interval(1, MainScheduler.sharedInstance)
let int1 = interval(1, scheduler: MainScheduler.sharedInstance)
.multicast(subject1)
_ = int1
@ -91,7 +91,7 @@ publish = multicast + replay subject
*/
func sampleWithReplayBuffer0() {
let int1 = interval(1, MainScheduler.sharedInstance)
let int1 = interval(1, scheduler: MainScheduler.sharedInstance)
.replay(0)
_ = int1
@ -126,7 +126,7 @@ func sampleWithReplayBuffer2() {
print("--- sampleWithReplayBuffer2 ---\n")
let int1 = interval(1, MainScheduler.sharedInstance)
let int1 = interval(1, scheduler: MainScheduler.sharedInstance)
.replay(2)
_ = int1
@ -169,7 +169,7 @@ so publish is basically replay(0)
*/
func sampleWithPublish() {
let int1 = interval(1, MainScheduler.sharedInstance)
let int1 = interval(1, scheduler: MainScheduler.sharedInstance)
.publish()
_ = int1

View File

@ -66,7 +66,7 @@ This function will perform a function on each element in the sequence until it i
*/
example("reduce") {
_ = sequenceOf(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
.reduce(0, +)
.reduce(0, accumulator: +)
.subscribe {
print($0)
}