Re:From Rust to TypeScript
by ImprobableTruth on Saturday September 12, 2020 @12:45PM
(#24453676)
The Either monad is a very nice solution for this in my opinion, in Haskell it's just
with it immediately returning after the first error value it encounters or returning the actual result (this is also how Rust solves it, though they introduce specific syntactic sugar for it rather than an universal monadic sugar).
[ Parent
| on HN ]
There are no comments on this comment yet.