Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/typelevel.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ So the end result of the expansion is the expression `throw new IndexOutOfBounds

## Rewrite Conditionals

Like matches, if-then-else expressions can also be prefixed with the `rewrite` modifier. Such rewrite conditional must have conditions that with a compile-time boolean result. The conditional then recuces to one of its branches depending on whether the condition is knwon to be `true` or to be `false`.
Like matches, if-then-else expressions can also be prefixed with the `rewrite` modifier. Such rewrite conditional must have conditions that with a compile-time boolean result. The conditional then recuces to one of its branches depending on whether the condition is known to be `true` or to be `false`.

For instance, here is an alternative version of `toNat` formulated with a conditional instead of a `match`.
```scala
Expand Down