6 kyu
Sending Data into Generators: The Basics
70 of 103o2001
Loading description...
Fundamentals
Language Features
Iterators
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
This is beautiful, thank you!
Thanks a lot!!!
Please do not approve this kata at
7kyu
. It will just collect endlessIssue
s and downvotes from frustrated beginners.This should be a
6
.Votes were split between 7 and 6 kyu. Approved at 6.
Thank you.
( JS, haven't even checked Python because I don't know enough Python )
yield
is not an expression,yield
is an operator ( by contrast,return
is a keyword ).yield $EXPRESSION
is an expression.That is true. Thank you so much! Is the terminology sound now? What tricked me was that you can do
something = yield
, so I always erroneously labeled it as an expression.Should be good.
yield;
is a special case which yieldsundefined
. I know of no other operator that can do this ( thoughreturn
can do the same thing ).Are you planning on making a JavaScript translation?
Yup, since pretty much all the concepts map to JS
I suggest to postpone approval till after the JS has been published and solved a couple of times.
Makes sense. So do I start creating the JS version?
Translated to JS
Nice kata!!
This is very important!