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

Add new koans for comprehensions #225

Merged
merged 2 commits into from
Sep 2, 2018

Conversation

s-oram
Copy link
Contributor

@s-oram s-oram commented Sep 2, 2018

The koans added here introduce comprehensions. (the for keyword.)

"Koans for special forms" #53

Added to partially complete the "Koans for special forms" issue.
elixirkoans#53
@s-oram
Copy link
Contributor Author

s-oram commented Sep 2, 2018

Please let me know if there is anything that can be improved. Thanks!

Copy link
Collaborator

@felipesere felipesere left a comment

Choose a reason for hiding this comment

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

This looks pretty nice! 😄
The only thing I feel would make this even better is folding some of the content up into the descriptions and intro. Maybe not 1:1, but their gist.


@intro "Comprehensions"

# A comprehension is made of three parts: generators, filters and collectables.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This would be a lovely @intro. Maybe even expanded to something like

@intro "A comprehension is made of three parts: generators, filters, and collectibles. We will look at how these interact with eachother".

I know other koans don't have a fancy @intro... its because I put the plumbing in place but never circled back to make them fun and read like a story. These koan could be refreshing comeback to that idea 😄

# A comprehension is made of three parts: generators, filters and collectables.

koan "Generators provide the values to be used in a comprehension" do
# In the expression below, `n <- [1, 2, 3, 4]` is the generator.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar trick as above, can we fold the key idea of the comment up into the description?

@felipesere
Copy link
Collaborator

The "request changes" button in Github is much harsher than what I had in mind 😢
I really like what you have put together!!! ❤️ 💙 💚 💛 🖤

@felipesere felipesere merged commit 17a6666 into elixirkoans:master Sep 2, 2018
@felipesere
Copy link
Collaborator

Thank youuuuu 👍

@s-oram
Copy link
Contributor Author

s-oram commented Sep 2, 2018

The "request changes" button in Github is much harsher than what I had in mind

No worries Felipesere. I appreciate the guidance! :) ❤️

@s-oram
Copy link
Contributor Author

s-oram commented Sep 2, 2018

PS: There were a couple of extra changes in there too!

@felipesere felipesere mentioned this pull request Sep 17, 2018
5 tasks
w0rd-driven pushed a commit to w0rd-driven/elixir-koans that referenced this pull request Jan 15, 2020
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.

2 participants