You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,10 +184,14 @@ foo: {
184
184
185
185
## `return` Statements
186
186
187
-
It's unclear what the `return` statement should do inside these generators. It could either return out of the outer function or abruptly stop the iteration of the generator. I'm leaning to just forbidding `return` for now.
187
+
It's unclear what the `return` statement should do inside these generators. It could either return out of the outer function or abruptly stop the iteration of the generator. I'm leaning to just forbidding `return` for now. Early returns are awkward but works, which seems fine because the use case for the completion value is rare anyway.
188
188
189
189
`throw` works just fine though.
190
190
191
+
## `do * { ... }` Syntax Alternative
192
+
193
+
An alternative syntax could use the `do` prefix since it is effectively in the same category as `do` expressions and this might help explain it once you are familiar with `do`-expressions. I tend to prefer the shortest possible syntax when possible though.
0 commit comments