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
I am totally new to the language, just started playing with the playground after hearing about Gleam from a Red Badger meet-up.
As I was mucking around, I made light changes to the examples involving random inputs as follows (e.g. this), which allows me to see different cases being triggered in the output.
importgleam/intimportgleam/iopubfnmain(){example()example()example()}fnexample(){letx=int.random(5)io.debug(x)letresult=casex{// Match specific values0->"Zero"1->"One"// Match any other value_->"Other"}io.debug(result)}
Just wonder whether this is an ever slightly easier example for absolute beginners to work through.
The text was updated successfully, but these errors were encountered:
Hi!
I am totally new to the language, just started playing with the playground after hearing about Gleam from a Red Badger meet-up.
As I was mucking around, I made light changes to the examples involving random inputs as follows (e.g. this), which allows me to see different cases being triggered in the output.
Just wonder whether this is an ever slightly easier example for absolute beginners to work through.
The text was updated successfully, but these errors were encountered: