Created
December 5, 2018 06:52
-
-
Save jrsinclair/219180f7e3bfe5de6184eb5a70393c0b to your computer and use it in GitHub Desktop.
Elegant Error Handling Code Samples
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
function processRow(headerFields, row) { | |
const rowObjWithDate = right(row) | |
.map(splitFields) | |
.chain(zipRow(headerFields)) | |
.chain(addDateStr); | |
return either(showError, rowToMessage, rowObjWithDate); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment