Switch in PureScript
Here’s how to translate the provided code example to PureScript:
Switch Statements#
Switch statements express conditionals across many branches.
To run the program, ensure you have PureScript and Spago installed, and follow these steps:
- Place the code in
Main.purs
. - In your project directory, install the necessary dependencies:
- Build and run the program using:
You should see the output as:
Let’s learn more about PureScript!