Skip to content

Commit 72d5d5e

Browse files
committed
Fix arg names
1 parent 9544fff commit 72d5d5e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/FSharpPlus/Data/NonEmptyList.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ module NonEmptyList =
152152
/// <param name="value">The element to add</param>
153153
/// <param name="list">The list to add to</param>
154154
/// <returns>A new list with the element added to the beginning.</returns>
155-
let cons e { Head = x; Tail = xs } = { Head = e ; Tail = x::xs }
155+
let cons value ({ Head = x; Tail = xs } as list) = { Head = value ; Tail = x::xs }
156156

157157
/// <summary>Splits the list in head and tail.</summary>
158158
/// <param name="list">The input list.</param>
159159
/// <returns>A tuple with the head and the tail of the original list.</returns>
160160
/// <exception cref="T:System.ArgumentException">Thrown when the input list tail is empty.</exception>
161161
let uncons ({ Head = x; Tail = xs } as list) =
162162
match xs with
163-
| [] -> invalidArg (nameof(list)) "The input sequence has an empty tail"
163+
| [] -> invalidArg (nameof list) "The input sequence has an empty tail"
164164
| _ -> x, ofList xs
165165

166166
/// <summary>Splits the NonEmptyList in head and tail.</summary>

0 commit comments

Comments
 (0)