OxL Reference

5.8 Other expressions

  • defer e — executes e on leaving the block (including on fail, return, cancellation), in the reverse order of declaration.
  • return e, fail e (§6.5), yield e (§10.3), respond e (§10.6) have type never.
  • x?.f — none if x is none; x ?? d — d if x is none; x! — the value, otherwise a panic (for T? — on none, for a result with an error — on an error).
  • a == b, where a: T?, b: T — false if a is none, otherwise a comparison of values.
  • x in coll — coll.contains(x).
  • drop(x) — destroys the value immediately (prelude).

See also

Source: docs/spec/oxl-standard.en.md