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

mergeWithDotPath point-free version #35

Merged
merged 2 commits into from
Jan 30, 2018

Conversation

aizerin
Copy link
Collaborator

@aizerin aizerin commented Jan 30, 2018

closes #22

Copy link
Owner

@tommmyy tommmyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to you we have 3 more useful functions 👍

path,
mergeFn(dotPath(path, obj), value), obj)
);
const takeFirst = nthArg(0);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call it firstArg and make it standalone function

mergeFn(dotPath(path, obj), value), obj)
);
const takeFirst = nthArg(0);
const takeForth = nthArg(3);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • call it lastArg
  • implement it like following: nthArg(-1)
  • and make it standalone function

@aizerin
Copy link
Collaborator Author

aizerin commented Jan 30, 2018

Done. I've added headArg and lastArg. I didn't write tests for them because I think that is not necessary.

@tommmyy tommmyy merged commit d0fe5b6 into tommmyy:master Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rewrite mergeWithDotPath to point-free
2 participants