Hacker News new | ask | show | jobs
by pyrolistical 969 days ago
So a monad.

Btw zig also does this in a nice way IMO. You declare possible error enums and the returned value is a union of all the errors or the success type. You then use existing union handling at each call site