8 ms·
And, after all that, they don’t even handle the IO errors.
by sambeau 3y ago
And, after all that, they don’t even handle the IO errors.
- vjerancrnjak 3y agoIt is very probable that data is an Either[Error, Result]. So you are forced to handle the error. You could also probably add a mapLeft and deal with an error at every step of computation. Given the way fp-ts work, this library should be very type safe. But of course, all of this looks much prettier and less verbose in haskell
- cleue 3y agoThe example actually does handle all errors, because the values are of type `Either` and the composition functions take this into account. If you would like to handle a particular error sitation explicitly, e.g. to enrich it with context or to transform one error into another, you may use `MapLeft` or `Swap`.