Skip to content

Commit

Permalink
Merge pull request #194 from benediktwerner/patch-1
Browse files Browse the repository at this point in the history
Fix code blocks in ch02-02-functions of the book
  • Loading branch information
baszalmstra authored May 16, 2020
2 parents 804ab35 + 65130f0 commit 8c20b47
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions book/src/ch02-02-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ fn foo() {
pub fn bar() {
// Because `bar` and `foo` are in the same file, this call is valid.
foo()
}```
}
```

When you want to interface from your host language (C++, Rust, etc.) with Mun,
you can only access `pub` functions. These functions are hot reloaded by the
Expand Down Expand Up @@ -114,7 +115,9 @@ fn foo() -> i32 {
};
// `bar` has a value 6
bar + 3
}```
}
```

### Returning Values from Functions

Functions can return values to the code that calls them. We don't name return
Expand Down

0 comments on commit 8c20b47

Please sign in to comment.