File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,8 @@ RxKotlin is a lightweight library that adds convenient extension functions to [R
6
6
7
7
8
8
``` kotlin
9
- package rx.lang.kotlin
10
-
11
- import rx.Observable
9
+ import io.reactivex.rxkotlin.subscribeBy
10
+ import io.reactivex.rxkotlin.toObservable
12
11
13
12
fun main (args : Array <String >) {
14
13
@@ -17,9 +16,9 @@ fun main(args: Array<String>) {
17
16
list.toObservable() // extension function for Iterables
18
17
.filter { it.length >= 5 }
19
18
.subscribeBy( // named arguments for lambda Subscribers
20
- onNext = { println (it) },
21
- onError = { it.printStackTrace() },
22
- onComplete = { println (" Done!" ) }
19
+ onNext = { println (it) },
20
+ onError = { it.printStackTrace() },
21
+ onComplete = { println (" Done!" ) }
23
22
)
24
23
25
24
}
You can’t perform that action at this time.
0 commit comments