File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ module NonEmptyList =
158158 /// <param name =" value " >The element to add</param >
159159 /// <param name =" list " >The list to add to</param >
160160 /// <returns >A new list with the element added to the beginning.</returns >
161- let cons e { Head = x ; Tail = xs } = { Head = e ; Tail = x:: xs }
161+ let cons value ( { Head = x ; Tail = xs } as list ) = { Head = value ; Tail = x:: xs }
162162
163163 /// <summary >Splits the list in head and tail.</summary >
164164 /// <param name =" list " >The input list.</param >
@@ -167,7 +167,7 @@ module NonEmptyList =
167167 let uncons ({ Head = x ; Tail = xs } as list ) =
168168 #if ! NET45
169169 match xs with
170- | [] -> invalidArg ( nameof( list) ) " The input sequence has an empty tail"
170+ | [] -> invalidArg ( nameof list) " The input sequence has an empty tail"
171171 | _ -> x, ofList xs
172172 #else
173173 match xs with
You can’t perform that action at this time.
0 commit comments