Added lens interface with get and set methods. Used to get and set a …#100
Open
ambushcat wants to merge 1 commit intoJYCabello:masterfrom
Open
Added lens interface with get and set methods. Used to get and set a …#100ambushcat wants to merge 1 commit intoJYCabello:masterfrom
ambushcat wants to merge 1 commit intoJYCabello:masterfrom
Conversation
…value in an object.
Owner
|
Hey, apologies, I received no email for this. I'll review it after lunch! |
JYCabello
requested changes
Dec 8, 2022
Owner
JYCabello
left a comment
There was a problem hiding this comment.
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); |
Owner
There was a problem hiding this comment.
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); |
Owner
There was a problem hiding this comment.
This function does not be to be generic.
| Name = name; | ||
| Price = price; | ||
| } | ||
| }; No newline at end of file |
Owner
There was a problem hiding this comment.
Please add newlines at the end of both files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…value in an object.