Mojo function
index
index[T: Indexer](idx: T, /) -> Int
Returns the value of __index__
for the given value.
Parameters:
- T (
Indexer
): A type conforming to theIndexer
trait.
Args:
- idx (
T
): The value.
Returns:
An Int
representing the index value.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
😔 What went wrong?