Skip to main content

Mojo module

bool

Implements the Bool class.

These are Mojo built-ins, so you don't need to import them.

Structs

  • Bool: The primitive Bool scalar value used in Mojo.

Traits

  • Boolable: The Boolable trait describes a type that can be explicitly converted to a Bool or evaluated as a boolean expression in if or while conditions.
  • ImplicitlyBoolable: The ImplicitlyBoolable trait describes a type that can be implicitly converted to a Bool.

Functions

  • all: Checks if all elements in the list are truthy.
  • any: Checks if any element in the list is truthy.
  • bool: Get the bool representation of the None type.