genericIndex

genericIndex :: Integral a => [b] -> a -> b
base Data.List
The genericIndex function is an overloaded version of !!, which accepts any Integral value as the index.