--- id: fn-is_ok name: is_ok category: builtins kind: builtin tokens: is_ok sig: is_ok(r: result) -> bool tip: True when a result carries a success payload. order: 14 --- Tests a result's tag: true when it was built with ok, false when it was built with err. Use it when you want to branch on success without unwrapping the payload — the payload itself is recovered with try/else. It is the exact negation of is_err. Parameters: - `r` — the result to test ```ludic program Check { function find(x: int) -> result { if x == 7 { return ok(x) } return err("missing") } test "is_ok classifies without unwrapping" { expect(is_ok(find(7))) expect(not is_ok(find(3))) } } ```