Fix the flip examples

Resolves #337
This commit is contained in:
Robert Mennell
2017-12-24 11:27:59 -08:00
parent 4b2938016a
commit c67688ed35

View File

@ -10,9 +10,9 @@ const flip = fn => (...args) => fn(args.pop(), ...args)
let a = {name: 'John Smith'} let a = {name: 'John Smith'}
let b = {} let b = {}
const mergeFrom = flip(Object.assign) const mergeFrom = flip(Object.assign)
let mergePerson = mergeFrom.bind(a) let mergePerson = mergeFrom.bind(null, a)
mergePerson(b) // == b mergePerson(b) // == b
b = {} b = {}
Object.assign(b, a) // == b Object.assign(b, a) // == b
*/ */
``` ```