Skip to main content

Mojo function

expect

expect[T: AnyTrivialRegType, //, expected_val: $0](val: T) -> $0

Provides information about expected (the most probable) value of val, which can be used by optimizers.

Constraints:

Only work with integer types.

Parameters:

  • T (AnyTrivialRegType): The type of the input value.
  • expected_val ($0): The expected value of val.

Args:

  • val (T): The input value.

Returns:

The input value.