Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FSharpLint's new recently added rule[1] complains about function Seq.tail being a partial function, so we need an alternative before all try-prefixed versions get included in FSharp.Core[2]. This is not actually a tryTail function but at least most uses of Seq.tail use a Seq.head before it, so we can replace both calls to Seq.(try)head & Seq.tail with a single-call to this Seq.tryHeadTail which shouldn't be considered a partial function anymore (even if it calls Seq.tail underneath). Adding it in FSharpx.Collections would be a nice stopgap instead of having to include this function in every F# project that wants to enable this new FSharpLint rule. [1] fsprojects/FSharpLint#453 [2] fsharp/fslang-suggestions#803
- Loading branch information