You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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):
typeSkippable<'a>withstatic memberFilter(s,p)= Skippable.filter p s
typeSkippable<'a>withmemberthis.Filter(p)= Skippable.filter p this
typeFSharpPlus.Control.Filterwithstatic memberFilter(s,p)= Skippable.filter p s
In 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?
The text was updated successfully, but these errors were encountered:
I have a custom type
Skippable<'a>
that's just likeOption
(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):In all cases, when I try to use
filter
on aSkippable<_>
value, I get a compiler error sayingIs this because I am using extension members? Is it possible to add support to custom types using extension members?
The text was updated successfully, but these errors were encountered: