I didn't find some way to get an item from a List(String) using an index. Like list[1]
fn main() {
let list = [1, 2];
let first_index = list[0];
println!("{:?}", first_index);
}
This code in Rust produces 1 as output. How can I do something similar on Gleam? And just out of curiosity, why is list[1] not a valid code in Gleam?