-
Notifications
You must be signed in to change notification settings - Fork 104
Closed
Description
I have a custom type Skippable<'a> that's just like Option (but semantically different). It's defined in a separate library.
In my code, I want to extend this type to support filter. With that in mind, I have tried the following, but none of them work (I have also tried switching the arguments):
type Skippable<'a> with
static member Filter(s, p) = Skippable.filter p stype Skippable<'a> with
member this.Filter(p) = Skippable.filter p thistype FSharpPlus.Control.Filter with
static member Filter(s, p) = Skippable.filter p sIn all cases, when I try to use filter on a Skippable<_> value, I get a compiler error saying
No overloads match for method 'ToSeq'.
Is this because I am using extension members? Is it possible to add support to custom types using extension members?
Metadata
Metadata
Assignees
Labels
No labels