Skip to content

Commit

Permalink
+ Explicit overload for Head
Browse files Browse the repository at this point in the history
  • Loading branch information
gusty committed Nov 26, 2023
1 parent 5453582 commit 1c422dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FSharpPlus/Data/NonEmptySeq.fs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type NonEmptySeq<'t> =
static member Lift3 (f, x: NonEmptySeq<_> , y: NonEmptySeq<_> , z: NonEmptySeq<_>) = NonEmptySeq<_>.lift3 f x y z
static member IsLeftZero (_: NonEmptySeq<_>) = false

// no need, it should take the one from Seq --> member this.Head (x: NonEmptySeq<'T> , [<Optional>]_impl: Head ) = x.First
member this.Head (x: NonEmptySeq<'T> , [<Optional>]_impl: Head) = x.First

Check failure on line 58 in src/FSharpPlus/Data/NonEmptySeq.fs

View workflow job for this annotation

GitHub Actions / testFable3SubsetOnCore

Interfaces cannot contain definitions of concrete instance members. You may need to define a constructor on your type to indicate that the type is a class.

static member TryHead (x: NonEmptySeq<'T>,[<Optional>]_impl: TryHead) = Some x.First
static member TryLast (x: NonEmptySeq<'T>, [<Optional>]_impl: TryLast) = Some <| Seq.last x
Expand Down

0 comments on commit 1c422dc

Please sign in to comment.