Skip to content

Instantly share code, notes, and snippets.

@almond-bongbong
Created August 17, 2018 04:36
Show Gist options
  • Save almond-bongbong/8432266fb850bb4c14cd7483217e5a22 to your computer and use it in GitHub Desktop.
Save almond-bongbong/8432266fb850bb4c14cd7483217e5a22 to your computer and use it in GitHub Desktop.
const add = (a) => (b) => (dispatch, getState) => a + b;
export const add10 = add(10);
export const add20 = add(20);
// result : 11
console.log(add10(1));
// result : 21
console.log(add20(1));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment