Skip to content

Instantly share code, notes, and snippets.

@indongyoo
Created April 3, 2018 12:42
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/8dda28b881339c5d24e757e638204ea7 to your computer and use it in GitHub Desktop.
Save indongyoo/8dda28b881339c5d24e757e638204ea7 to your computer and use it in GitHub Desktop.
const f10 = pipe(
arr => arr.map(a => a + 5),
arr => arr.some(a => a > 10),
console.log
).error(
e => console.log('err --->', e)
);
f10([5, 10, 15]); // true
const f11 = pipe(
arr => arr.map(a => aasdqwe),
arr => arr.some(a => a > 10),
console.log
).error(
e => console.log('err --->', e)
);
f11([5, 10, 15]); // err ---> ReferenceError: aasdqwe is not defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment