-
Notifications
You must be signed in to change notification settings - Fork 601
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
Conversation
Added to partially complete the "Koans for special forms" issue. elixirkoans#53
Please let me know if there is anything that can be improved. Thanks! |
There was a problem hiding this 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.
lib/koans/20_comprehensions.ex
Outdated
|
||
@intro "Comprehensions" | ||
|
||
# A comprehension is made of three parts: generators, filters and collectables. |
There was a problem hiding this comment.
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 😄
lib/koans/20_comprehensions.ex
Outdated
# 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. |
There was a problem hiding this comment.
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?
The "request changes" button in Github is much harsher than what I had in mind 😢 |
Thank youuuuu 👍 |
No worries Felipesere. I appreciate the guidance! :) ❤️ |
PS: There were a couple of extra changes in there too! |
Add new koans for comprehensions
The koans added here introduce comprehensions. (the
for
keyword.)"Koans for special forms" #53