Skip to content

Adds example solutions for the observables homework#10

Open
codebyuma wants to merge 1 commit into
bridge-school:masterfrom
codebyuma:uc-add-observable-solutions
Open

Adds example solutions for the observables homework#10
codebyuma wants to merge 1 commit into
bridge-school:masterfrom
codebyuma:uc-add-observable-solutions

Conversation

@codebyuma
Copy link
Copy Markdown
Collaborator

@codebyuma codebyuma commented Mar 26, 2018

Just a reminder: to view the output for each exercise, open the .html file in your browser and open the browser console.

No output after the fourth click,
"Dog #5" after the fith click, and so on.
*/

Copy link
Copy Markdown
Collaborator Author

@codebyuma codebyuma Mar 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: in reality, we may want to filter before we map to avoid doing extra work on the emissions we'll eventually ignore. But since the desired output adds the source stream's emission number to the string, we have to filter after we map.

For example, if we filtered first and then mapped, then the output would be Dog #1, Dog #2, etc. If we map and then filter, the output is Dog #1, Dog #3, etc.

If this doesn't make sense, try switching the order and you can see it in 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

Successfully merging this pull request may close these issues.

1 participant