Skip to content

Commit 8ad2646

Browse files
authored
Update README with shorthand notation for Result
Added a note about shorthand notation for Result.
1 parent ee236a7 commit 8ad2646

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ An operator behaves like a function call with arguments and a return value. The
195195

196196
Here, the `try` operator also takes a single argument (the code it protects) and "returns" a `Result`.
197197

198-
A shorthand notation for `Result` in this proposal is `Result(true, value)` and `Result(false, error)`, representing `[true, undefined, value]` and `[false, error, undefined]`, respectively.
198+
> [!TIP]
199+
>
200+
> A shorthand notation for `Result` in this proposal is `Result(true, value)` and `Result(false, error)`, representing `[true, undefined, value]` and `[false, error, undefined]`, respectively.
199201
200202
The `try` operator never throws, and it catches anything the code in its expression throws during execution. Just like the `try {}` block, it does NOT catch syntax errors since those occur when the file is loaded.
201203

0 commit comments

Comments
 (0)