Skip to content

Instantly share code, notes, and snippets.

@indongyoo
Created April 3, 2018 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indongyoo/a071c282f08b997b9d1aeb455405a98d to your computer and use it in GitHub Desktop.
Save indongyoo/a071c282f08b997b9d1aeb455405a98d to your computer and use it in GitHub Desktop.
const f12 = pipe(
arr => arr.map(a => new Promise(function(resolve, reject) {
reject(`${a} reject!`);
})),
arr => arr.some(a => a > 10), // <-- 여기에 [Promise, Promise, Promise] 가 내려가고
console.log // <-- false가 찍힙니다.
).error(
e => console.log('err --->', e)
);
f12([5, 10, 15]);
// Uncaught (in promise) 5 reject!
// Uncaught (in promise) 10 reject!
// Uncaught (in promise) 15 reject!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment