We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09af101 commit 9ffc1c0Copy full SHA for 9ffc1c0
1 file changed
src/FSharpPlus/Data/NonEmptyList.fs
@@ -163,10 +163,10 @@ module NonEmptyList =
163
| [] -> invalidArg (nameof(list)) "The input sequence has an empty tail"
164
| _ -> x, ofList xs
165
166
- /// <summary>Splits the list in head and tail.</summary>
167
- /// <param name="list">The input list.</param>
+ /// <summary>Splits the NonEmptyList in head and tail.</summary>
+ /// <param name="list">The input (non empty) list.</param>
168
/// <returns>A tuple with the head and the tail of the original list.</returns>
169
- let unconsAsList { Head = x; Tail = xs } = x, xs
+ let unconsAsList list = match list with { Head = x; Tail = xs } -> x, xs
170
171
/// Returns the first element of a new non empty list. You can also use property nel.Head.
172
let head {Head = x; Tail = _ } = x
0 commit comments