fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

index_of

interval.index_of

index_of(e T) => option i64[Redefinition of  Sequence.index_of][src]
index of `e` in this interval, `nil` if not contained

Inverse of `nth`: for a valid index `i`, `index_of` of the `i`-th
element returns `i`.

Complexity: O(1), unlike the inherited O(n) search. This depends on
`contains` being redefined in this feature to be O(1) as well.
Precondition
Inherited from Sequence.index_of
pre
  T : property.equatable

Arguments

e T[src]
0.099dev (GIT hash e2d5298d8107bb5fe79600fdb06a49bc75756344)
last changed: 2026-11-23