sema-docs 1.21.2

Canonical structured documentation for Sema builtins/special forms; powers LSP hover/completion and REPL apropos
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
---
name: "assert="
module: "system"
section: "Errors"
params: [{ name: expected, type: any }, { name: actual, type: any }]
---

Raise an error if `expected` and `actual` are not equal, with a message showing both values. Returns `#t` when they match.

```sema
(assert= 4 (+ 2 2))   ; => #t
(assert= 4 5)         ; raises "assertion failed: expected 4, got 5"
```