-
Notifications
You must be signed in to change notification settings - Fork 1
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
Added lens interface with get and set methods. Used to get and set a … #100
base: master
Are you sure you want to change the base?
Conversation
…value in an object.
Hey, apologies, I received no email for this. I'll review it after lunch! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump the versions in the csproj file, so a new version gets published.
Thanks a lot.
/// <returns>Value of property of type B.</returns> | ||
[Pure] | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public B Get<A, B>(Lens<A, B> lens, A item) => lens.GetF(item); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function does not need to be generic.
/// <returns>Type A.</returns> | ||
[Pure] | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public A Set<A, B>(Lens<A, B> lens, A item, B value) => lens.SetF(value, item); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function does not be to be generic.
Name = name; | ||
Price = price; | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add newlines at the end of both files.
…value in an object.