Observable.just("Donald", "Duck", "Mickey", "Goofy",
"Uncle")
.doOnNext{System.out.println("Here ou will get the strings above:$it ")}
.map{it.length}
.subscribe { println("Here you will get the numbers of how every string is long: $it") }}
Observable.just("Some data...")
.doOnNext(System.out::println)
.doOnNext(value -> System.out.println("before transform: " + value+" You can add something here but it dont affect in data"))
.map(value -> value + "| adding some new data")
.doOnNext(value -> System.out.println("after transform: " + value))
.subscribe(onNext -> {
System.out.println("onNext: "+onNext); // print out the remaining numbers
});