2021-08-04 19:09:51 +03:00
|
|
|
# Examples
|
|
|
|
|
|
|
|
Run examples as follows:
|
2022-02-28 15:41:19 +03:00
|
|
|
|
2022-06-15 17:33:03 +03:00
|
|
|
1. Navigate to this `examples` folder
|
2022-02-28 15:41:19 +03:00
|
|
|
|
|
|
|
```bash
|
|
|
|
cd examples
|
|
|
|
```
|
|
|
|
|
2022-06-15 18:14:53 +03:00
|
|
|
2. Run a particular example, such as Hello World:
|
2022-02-28 15:41:19 +03:00
|
|
|
|
|
|
|
```bash
|
2022-06-15 17:33:03 +03:00
|
|
|
roc run hello-world/main.roc
|
2022-02-28 15:41:19 +03:00
|
|
|
```
|
|
|
|
|
2022-06-15 17:33:03 +03:00
|
|
|
`examples/benchmarks/` contains some larger examples.
|
|
|
|
|
2021-08-04 19:04:44 +03:00
|
|
|
Some examples like `examples/benchmarks/NQueens.roc` require input after running.
|
2021-08-06 06:14:59 +03:00
|
|
|
For NQueens, input 10 in the terminal and press enter.
|