diff options
| author | razetime <raghuallthetime@hotmail.com> | 2022-01-19 10:14:32 +0530 |
|---|---|---|
| committer | razetime <raghuallthetime@hotmail.com> | 2022-01-19 10:14:32 +0530 |
| commit | cf65cfb32f34b7c9fed4614479d8242c51321bac (patch) | |
| tree | 46e00a664396fdb4452e5eb89c87ddd033aedc38 /help/!assert assertwithmsg.md | |
| parent | 9465180cb19a41efccd7130cfc75d760a733bb30 (diff) | |
primitive function and modifier help pages
Diffstat (limited to 'help/!assert assertwithmsg.md')
| -rw-r--r-- | help/!assert assertwithmsg.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/help/!assert assertwithmsg.md b/help/!assert assertwithmsg.md new file mode 100644 index 00000000..4e823a1e --- /dev/null +++ b/help/!assert assertwithmsg.md @@ -0,0 +1,31 @@ +Exclamation Mark (`!`) + +`! 𝕩`: Assert + +Throw an error if `𝕩` is not 1. +``` + ! 1 +1 + ! 2 +Error: Assertion error +at ! 2 + ^ + ! "hello" +Error: hello +at ! "hello" +``` + +`𝕨 ! 𝕩`: Dyad + +Throw an error with message `𝕨` if `𝕩` is not 1. +``` + "hi" ! 1 +1 + "two" ! 2 +Error: two +at "two" ! 2 + ^ + "hello error" ! "hello" +Error: hello error +at "hello error" ! "hello" +```
\ No newline at end of file |
