Skip to content

Instantly share code, notes, and snippets.

@indongyoo
Created April 3, 2018 12:38
Show Gist options
  • Select an option

  • Save indongyoo/459aa8e17fa4fe3f082c09e80754d474 to your computer and use it in GitHub Desktop.

Select an option

Save indongyoo/459aa8e17fa4fe3f082c09e80754d474 to your computer and use it in GitHub Desktop.
const f4 = pipe(
a => a + 10,
a => asdasd123asdasd,
a => a + 100 // <-- 오지 않습니다.
).error(log); // ReferenceError: asdasd123asdasd is not defined
log(f4(1)); // undefined 리턴되고, error로 가서 에러 출력
const f5 = pipe(
a => a + 10,
a => { throw '던져!' },
a => a + 100 // <-- 오지 않습니다.
).error(log); // 던져!
log(f5(1)); // undefined 리턴되고, error로 가서 던져! 출력
const f6 = pipe(
a => a + 10,
a => Promise.reject('리젝!'),
a => a + 100 // <-- 오지 않습니다.
).error(log); // 리젝!
log(f6(1)); // undefined 리턴되고, error로 가서 리젝! 출력
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment