how to get the value of the last element of a List? I\'ve noted that List.hd (or .Head) return an item, while List.tl (or .Tail) returns a List.
Is rev the List and
As a novice F# developer, I don't see what the harm is in doing the following
let mylist = [1;2;3;4;5] let lastValue = mylist.[mylist.Length - 1]
Imperative in nature? Yes but no need for recursion.