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
First off, this is such a cool and exciting project!
Second, in Elixir, I'll quite often use a case at the end or middle of a pipe, saving unnecessary assignments, and I was wondering if it might be cool to implement the same thing here in Gleam!
Taking an example from new interactive tutorial (awesome btw) it could look something like
1
|> case {
// Match specific values
0 -> "Zero"
1 -> "One"
// Match any other value
_ -> "Other"
}
|> io.debug()
I would be super happy to take this on, but I might have to ask some questions in the discord if that's alright!
Also if this has already been discussed, then super sorry for the wasted issue. I took a look and didn't see anything but I could have totally missed it.
Thanks!
The text was updated successfully, but these errors were encountered:
Talked the idea through with some folks on the discord and decided that, for a couple reasons (ambiguity with cases with multiple subjects, code style) piping directly into a case isn't the way Gleam wants to go, so I'm gonna go ahead and close this issue.
First off, this is such a cool and exciting project!
Second, in Elixir, I'll quite often use a case at the end or middle of a pipe, saving unnecessary assignments, and I was wondering if it might be cool to implement the same thing here in Gleam!
Taking an example from new interactive tutorial (awesome btw) it could look something like
I would be super happy to take this on, but I might have to ask some questions in the discord if that's alright!
Also if this has already been discussed, then super sorry for the wasted issue. I took a look and didn't see anything but I could have totally missed it.
Thanks!
The text was updated successfully, but these errors were encountered: