From cf65cfb32f34b7c9fed4614479d8242c51321bac Mon Sep 17 00:00:00 2001 From: razetime Date: Wed, 19 Jan 2022 10:14:32 +0530 Subject: primitive function and modifier help pages --- help/!assert assertwithmsg.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 help/!assert assertwithmsg.md (limited to 'help/!assert assertwithmsg.md') 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 -- cgit v1.2.3