Since you cannot move backward through the sequences, lists are an ideal medium for reversing sequences. They even tend to reverse, when you build them, go to the figure.
I have no idea why rev not in the Seq module in the first place. Even LINQ has a Reverse() operator. Fortunately, it is very easy to implement.
let rev xs = Seq.fold (fun acc x -> x::acc) [] xs
Another option is to simply use the LINQ statement.
let rev = System.Linq.Enumerable.Reverse
source share