joshskeen / rxjava-koans

A series of interactive exercises that teach you RxJava

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem statement doesn't match solution

RobLewis opened this issue · comments

The "secret Extra Challenge" in Lesson C-1 is made extra challenging by the fact that the problem is stated in terms of Queue 1, while the solution is all about Queue 2.

Regardless, I'm confused by the solution: .getPassengers() is called as though it has already finished processing the queue, but isn't this processing done item-by-item? How can .getPassengers() already have the final answer as to who is on the elevator?

Another thing I'm not clear on: simply re-using an Observable like these Queues seems to reset them to start over at the beginning. Can you discuss and clarify?

Thanks for making this—it's an enjoyable way to learn. I have frankly been having some trouble wrapping my mind around the whole Rx concept.

Ah, figured it out! I had assumed that the Extra Challenge started with an empty elevator, but now I see that it doesn't. Makes sense now. Maybe the problem statement should mention this.
Would still like to see a discussion of "resetting" the passenger queue observable to start over. And you still need to resolve the Queue 2 vs. Queue 1 discrepancy.