Either represents a value that can be one of two cases, making success and failure travel together as one result. It is used to reify errors, avoid exception throwing, and keep function chains composable. section 5.3
The treatment contrasts it with Maybe: Maybe handles missing values, while Either carries an actual error object or message when a lookup or decode fails. section 5.3
Lookup and decode examples
A database search returns Either.of(obj) on success and a left value with an error message on failure. A URL decoder wraps decodeURIComponent in try/catch, then maps only if decoding succeeds.
This approach keeps downstream code clean: later steps can map over a successful value, and failures remain available for logging or fallback handling.



