Skip to content

Commit

Permalink
Merge pull request #198 from moonbitlang/zhiyuan/fix-moon-example
Browse files Browse the repository at this point in the history
fix: change moon examples from init to main
  • Loading branch information
bzy-debug authored May 8, 2024
2 parents 2a55016 + 47bd291 commit 484d6d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build-system-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ The `lib` package contains `hello.mbt` and `hello_test.mbt` files:
The `main` package contains a `main.mbt` file:

```rust
fn init {
fn main {
println(@lib.hello())
}
```
Expand Down Expand Up @@ -254,7 +254,7 @@ In the `main/moon.pkg.json` file, import the `username/hello/lib/fib` package an
This line imports the `fib` package, which is part of the `lib` package in the `hello` module. After doing this, you can use the `fib` package in `main/main.mbt`. Replace the file content of `main/main.mbt` to:

```rust
fn init {
fn main {
let a = @my_awesome_fibonacci.fib(10)
let b = @my_awesome_fibonacci.fib2(11)
println("fib(10) = \(a), fib(11) = \(b)")
Expand Down

0 comments on commit 484d6d8

Please sign in to comment.