Skip to content

Commit

Permalink
Merge pull request #2 from Rigidity/fix-mistake
Browse files Browse the repository at this point in the history
Fix mistake
  • Loading branch information
Rigidity authored Aug 4, 2024
2 parents 376cffb + c4acd8d commit ab70eb3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/types/type-checking.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,9 @@ To achieve this, you can write your own recursive function to check instead:

```rue
fun is_int_list(value: Any) -> Bool {
match value {
(Int, Any) => is_int_list(value.rest),
nil => true,
_ => false,
if value is Bytes {
return value == nil;
}
value.first is Int && is_int_list(value.rest)
}
```

0 comments on commit ab70eb3

Please sign in to comment.