-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing the type of the structure #59
Comments
What do you mean? Could you please show your implementation and an example reproducing the issue? |
My attempt at this:
The last two lines won't work unless you explicitly give the generic type parameters. |
These exist in the original Scala |
So that means you know a way to implement this that would not force the user to write down the type arguments explicitly every time? |
|
That's cool! But does it work with my Pair type above, a type with type parameters. |
Just a note - I think |
In Haskell you can change the type of the structure:
type Lens s t a b = s -> (a, b -> t)
(or whatever representation you choose)In none of the typescript lens implementations I've seen this.
I tried myself but I couldn't implement it this way without losing type inference.
Have you ever thought about it?
The text was updated successfully, but these errors were encountered: