Fix a sample code in tutorial to match its context

This commit is contained in:
Yuki Omoto 2023-03-19 21:21:34 +09:00
parent c536c70238
commit 3c95849914
No known key found for this signature in database
GPG Key ID: 9A7D6C91D5219717

View File

@ -346,8 +346,8 @@ The `addAndStringify` function will accept any record with at least the fields `
```roc
total = addAndStringify { birds: 5, iguanas: 7 }
# The `name` field is unused by addAndStringify
totalWithNote = addAndStringify { birds: 4, iguanas: 3, name: "Whee!" }
# The `note` field is unused by addAndStringify
totalWithNote = addAndStringify { birds: 4, iguanas: 3, note: "Whee!" }
addAndStringify = \counts ->
Num.toStr (counts.birds + counts.iguanas)