We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f024238 commit 1ff4b54Copy full SHA for 1ff4b54
src/FSharpPlus/Data/NonEmptyList.fs
@@ -175,10 +175,10 @@ module NonEmptyList =
175
| _ -> x, ofList xs
176
#endif
177
178
- /// <summary>Splits the list in head and tail.</summary>
179
- /// <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>
180
/// <returns>A tuple with the head and the tail of the original list.</returns>
181
- let unconsAsList { Head = x; Tail = xs } = x, xs
+ let unconsAsList list = match list with { Head = x; Tail = xs } -> x, xs
182
183
/// Returns the first element of a new non empty list. You can also use property nel.Head.
184
let head {Head = x; Tail = _ } = x
0 commit comments