Skip to content

Instantly share code, notes, and snippets.

@jrsinclair
Created December 5, 2018 22:06
Show Gist options
  • Save jrsinclair/08e2a564350e2a8071039fc7f889ea8c to your computer and use it in GitHub Desktop.
Save jrsinclair/08e2a564350e2a8071039fc7f889ea8c to your computer and use it in GitHub Desktop.
Elegant Error Handling Code Samples
function processRows(headerFields) {
return function processRowsWithHeaderFields(dataRows) {
// Note this is Array map, not Either map.
return dataRows.map(row => processRow(headerFields, row));
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment