I would like to do the following in F#:
let index = 5
let sequence = [0..10]
let fifthElement =
sequence
|> .[index]
However, the last line is invalid. What I'd like to do is to actually retrieve the element at the index of 5 in the sequence
. Am I doing things wrong?
From what I understand, pipelining helps to reverse the function call, but I am not sure how to retrieve the element at a particular index using pipelining.