Skip to content

Commit

Permalink
Update functions.md
Browse files Browse the repository at this point in the history
  • Loading branch information
StunxFS authored Oct 18, 2023
1 parent 8667df1 commit b0372f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ multiple statements.
The way to declare functions in Rivet is as follows:

```swift
func <name>(<args>) [return_type] {
func <name>(<args>) [-> return_type] {
...
}
```

For example:

```swift
func add(a: int32, b: int32) int32 {
func add(a: int32, b: int32) -> int32 {
return a + b;
}
```
Expand All @@ -25,7 +25,7 @@ Functions can have 0 arguments.

```swift
// `f1` returns a simple numeric value of type `int32`.
func f1() int32 {
func f1() -> int32 {
return 0;
}

Expand Down

0 comments on commit b0372f2

Please sign in to comment.