Mojo function
expect
expect[T: AnyTrivialRegType, //, expected_val: $0](val: T) -> T
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 ofval
.
Args:
- val (
T
): The input value.
Returns:
The input value.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!