The problem occurs when somethings
is an empty list.
In this case, results
is empty and calling Seq.skip 1
on the empty list fails with an error.
I think an elegant solution would be to change the last line to
match results.Length with
| 0 -> results |> Seq.cast
| _ -> results |> Seq.cast |> Seq.skip 1