Skip to content

Commit

Permalink
Merge 953baa0 into 2f07973
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Aug 20, 2016
2 parents 2f07973 + 953baa0 commit aa621fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ import {setAt} from './set-at'
* @example
* copy('a.b', {a: {b: 100}}, {p: 100}) // outputs: {a: {b: 100}, q: 100}
*/
export const copy = (path, source, destination) => {
export const copy = R.curry((path, source, destination) => {
return setAt(path, R.path(R.split('.', path), source), destination)
}
})
4 changes: 2 additions & 2 deletions src/when.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ import R from 'ramda'
* @param {function} func - the function to be called
* @return {function}
*/
export const when = (condition, func) => {
export const when = R.curry((condition, func) => {
return R.ifElse(R.always(condition), func, R.identity)
}
})

0 comments on commit aa621fc

Please sign in to comment.