-
Notifications
You must be signed in to change notification settings - Fork 39
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
Allow “else” in “do” #188
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
do (f) { x }
is desugared to{ x } f
, that is, it lets you use a combinator like a flow control construct:I figure it would be useful for success/error callbacks in async code if a
do
block allowed an optionalelse
:So
do (f) { x } else { y }
would desugar to{ x } { y } f
or maybe{ y } { x } f
if that turns out to work well with more functions.I’m not sure if this needs an equivalent to
elif
(eldo
?) for chaining multipledo
…else
together. It seems logical but I don’t have a specific use case in mind.The text was updated successfully, but these errors were encountered: