Garden 🌻

List::get

Get the item in the list at the index specified.

Returns None if the index is less than 0 or if the index is greater than length - 1.

[4, 5, 6].get(1) //-> Some(5)
[4, 5, 6].get(3) //-> None
Source Codepublic method get<T>(this: List<T>, index: Int): Option<T> {
  __BUILTIN_IMPLEMENTATION
}