Skip to content

Commit

Permalink
Update docs/topics/functions.md
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Haggarty <[email protected]>
  • Loading branch information
vegarsti and sarahhaggarty authored Jul 19, 2023
1 parent 917686f commit f7393d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/topics/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ fun printHello(name: String?) { ... }

### Single-expression functions

When a function contains a single `return` expression, the curly braces can be omitted and the body is specified after a `=` symbol:
When the function body consists of a single expression, the curly braces can be omitted and the body specified after an `=` symbol:

```kotlin
fun double(x: Int): Int = x * 2
Expand Down

0 comments on commit f7393d0

Please sign in to comment.