little corrections
This commit is contained in:
parent
95ba612334
commit
e3a4bc2f4d
|
|
@ -182,7 +182,12 @@ example("create") {
|
|||
observable
|
||||
>- subscribeNext {
|
||||
println($0)
|
||||
}
|
||||
}
|
||||
|
||||
observable
|
||||
>- subscribeNext {
|
||||
println($0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -196,7 +201,7 @@ Create an Observable from a function which create an observable. But do not crea
|
|||
|
||||
example("defer") {
|
||||
|
||||
let defered: Observable<Int> = defer({
|
||||
let defered: Observable<Int> = defer {
|
||||
println("creating")
|
||||
return create { observer in
|
||||
println("emmiting")
|
||||
|
|
@ -206,17 +211,17 @@ example("defer") {
|
|||
|
||||
return AnonymousDisposable {}
|
||||
}
|
||||
})
|
||||
|
||||
defered
|
||||
>- subscribeNext {
|
||||
println($0)
|
||||
}
|
||||
|
||||
defered
|
||||
>- subscribeNext {
|
||||
println($0)
|
||||
}
|
||||
}
|
||||
|
||||
defered
|
||||
>- subscribeNext {
|
||||
println($0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Operators that transform items that are emitted by an Observable.
|
|||
/*:
|
||||
### `map` / `select`
|
||||
|
||||
transform the items emitted by an Observable into Observables, then flatten the emissions from those into a single Observable
|
||||
Transform the items emitted by an Observable by applying a function to each item
|
||||
[More info in reactive.io website]( http://reactivex.io/documentation/operators/map.html )
|
||||
*/
|
||||
|
||||
|
|
@ -30,15 +30,15 @@ example("map") {
|
|||
>- map { char in
|
||||
char.hashValue
|
||||
}
|
||||
>- subscribeNext {
|
||||
println($0)
|
||||
>- subscribeNext { int in
|
||||
println(int)
|
||||
}
|
||||
}
|
||||
|
||||
/*:
|
||||
### `flatMap`
|
||||
|
||||
transform the items emitted by an Observable into Observables, then flatten the emissions from those into a single Observable
|
||||
Transform the items emitted by an Observable into Observables, then flatten the emissions from those into a single Observable
|
||||
[More info in reactive.io website]( http://reactivex.io/documentation/operators/flatmap.html )
|
||||
*/
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ example("flatMap") {
|
|||
/*:
|
||||
### `scan`
|
||||
|
||||
apply a function to each item emitted by an Observable, sequentially, and emit each successive value
|
||||
Apply a function to each item emitted by an Observable, sequentially, and emit each successive value
|
||||
[More info in reactive.io website]( http://reactivex.io/documentation/operators/scan.html )
|
||||
*/
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue