Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LessonB - 5 Inconsistent #14

Open
AnonymousWalker opened this issue Feb 22, 2021 · 0 comments
Open

LessonB - 5 Inconsistent #14

AnonymousWalker opened this issue Feb 22, 2021 · 0 comments

Comments

@AnonymousWalker
Copy link

AnonymousWalker commented Feb 22, 2021

https://github.com/mutexkid/rxjava-koans/blob/master/src/test/java/lessonB_MapAndFlatMapAndBasicOperators.java#L191-L207

I find the comment block saying

In this example we have one Observable and we perform two actions on the data it emits.
Lets build two Strings by concatenating some integers.

but the code has the third string named mStringC and also performs an action on it.

        mStringC = "";
        Observable.range(1, 6)
                .doOnNext(integer -> mStringA += integer)
                .doOnNext(integer -> {
                    if (integer % 2 == 0) {
                        mStringB += integer;
                    }
                })
                .doOnNext(integer -> mStringC += integer)
                .subscribe(integer -> mStringC += integer);

The solution does not have this variable nor its action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant