diff --git a/book/src/language-tour/assert.md b/book/src/language-tour/assert.md index 72e71fc2..ed29ab04 100644 --- a/book/src/language-tour/assert.md +++ b/book/src/language-tour/assert.md @@ -7,4 +7,10 @@ assert rawdata = SomeType Causes the script to fail if the rawdata doesn't match the structure of datumtype Otherwise, returns a value of SomeType -Primarily for validating input datums / redeemers. \ No newline at end of file +Primarily for validating input datums / redeemers. + +You can unpack (1-match) data in the assertion + +```gleam +assert Some(x) = Option(Int) +``` \ No newline at end of file