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).

comparable

Implements comparison and equality traits for Mojo types.

Traits

  • Comparable: A type which can be compared for order with other instances of itself.
  • Equatable: A type which can be compared for equality with other instances of itself.