DEV Community

Discussion on: Either: fp-ts

Collapse
 
ziggyzag profile image
Ziggy

Overall thank you! For clarity's sake, should it be E.mapLeft(makeError) instead of E.mapLeft(error)?

Collapse
 
waynevanson profile image
Wayne Van Son

Thanks for that!

mapLeft takes a function, which is why we provided makeError as the argument.

error does not exist unless you make exist by creating a variable from within a closure in mapLeft.