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
There maybe a way already to allow this. I would like to be able to use interfaces for the elements. At the moment I believe that would mean having equals and hashCode on the interface which would then mean creating an instance of the interface would require setting those each time.
If the collection implementations could take an EqualityComparer which has those 2 methods then I believe I could use interfaces.
Another advantage is that I could then have different Equality for the same interface. My main Interface is:
It's true that prelude-ts is currently more geared towards objects. Maybe we could add such a feature, depending on how much change would have to be done to the implementation. I'm guessing it wouldn't be too bad, but I don't plan on investing time on this soon.
I think this means that Sets that require custom equality or hash code generation can only be used with classes and methods and not simple objects (for example number[])?
There maybe a way already to allow this. I would like to be able to use interfaces for the elements. At the moment I believe that would mean having equals and hashCode on the interface which would then mean creating an instance of the interface would require setting those each time.
If the collection implementations could take an EqualityComparer which has those 2 methods then I believe I could use interfaces.
Another advantage is that I could then have different Equality for the same interface. My main Interface is:
interface Fact { subject: string, property: string , value: string }
Depending on the circumstance any of the properties could be the key or any combination also.
Thanks.
The text was updated successfully, but these errors were encountered: