Skip to content
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

Fix Diff documentation #237

Merged
merged 3 commits into from Nov 12, 2020
Merged

Fix Diff documentation #237

merged 3 commits into from Nov 12, 2020

Conversation

@dsnet
Copy link
Member

@dsnet dsnet commented Oct 15, 2020

The description inaccurately describes the operation of Diff,
which is y - x, where a '+' prefix denotes elements added from y
and a '-' prefix denotes elements removed from x.

For example:

// Consider this call to Diff and its result.
                  x  y
cmp.Diff({b:2, c:3}, {a:1, b:2}) => {+a:1, b:2, -c:3}

// Consider the same in mathematical notation.
         y - x
{a:1, b:2} - {b:2, c:3} = {+a:1, b:2, -c:3}
The description inaccurately describes the operation of Diff,
which is y - x, where a '+' prefix denotes elements added from y
and a '-' prefix denotes elements removed from x.

For example:
	// Consider this call to Diff and its result.
	                  x  y
	cmp.Diff({b:2, c:3}, {a:1, b:2}) => {+a:1, b:2, -c:3}

	// Consider the same in mathematical notation.
	         y - x
	{a:1, b:2} - {b:2, c:3} = {+a:1, b:2, -c:3}
@dsnet dsnet requested a review from neild Oct 15, 2020
neild
neild approved these changes Nov 12, 2020
@dsnet dsnet merged commit 0a3ecd3 into master Nov 12, 2020
3 checks passed
@dsnet dsnet deleted the doc branch Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants