IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

assume

assume(val: Bool)

Signals to the optimizer that the condition is always true. This allows the optimizer to optimize the code.

Args:

  • val (Bool): The input value which is assumed to be True.