Created
April 3, 2018 12:39
-
-
Save indongyoo/4f61700c9c834f13bd75f89c2f65c273 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const f9 = pipe( | |
a => ({ status: a }), | |
a => Promise.reject('reject!'), | |
).exception(e => e && e.status == 10) ( | |
e => console.log('e 10') | |
).error( | |
e => console.log(e) | |
).nullable( | |
e => console.log('nullable~') | |
); | |
f9(10); // e 10 | |
f9(null); // nullable~ | |
f9(20); // reject! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment