Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
KennedyTedesco committed Dec 15, 2024
1 parent 05d6c30 commit fd20de5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ docker run --rm -v $(pwd):/monkey -w /monkey php:8.4-cli ./vendor/bin/pest
Running from a file contents of the examples folder:

```bash
docker run --rm -v (pwd):/monkey -w /monkey php:8.4-cli ./monkey run examples/fibo_while.monkey
docker run --rm -v (pwd):/monkey -w /monkey php:8.4-cli ./monkey --stats run examples/fibo_while.monkey
```

### Using the REPL
Expand All @@ -158,17 +158,23 @@ docker run -it --rm -v (pwd):/monkey -w /monkey php:8.4-cli ./monkey repl
Example:

```text
🐒 Monkey Programming Language v1.0.0
Type ':h' for help, ':c' for clear, ':q' to quit
+---------------------------------------+
| 🐒 Monkey Programming Language v1.0.0 |
| |
| Type :c for clear, :q to quit |
+---------------------------------------+
➜ let a = 20 + fn(x){ return x + 10; }(2);
32
```

Or, if you want to execute a file:

```bash
docker run --rm -v (pwd):/monkey -w /monkey php:8.4-cli ./monkey run examples/closure.monkey
docker run --rm -v (pwd):/monkey -w /monkey php:8.4-cli ./monkey --stats run examples/closure.monkey
```

### Contributing
Expand Down

0 comments on commit fd20de5

Please sign in to comment.