Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
exceptione
· 2mo ago · 0 comments
Monad Maybe?
Comments
[–]
notpushkin
2mo ago
Kinda like that, but with the error branch having a value too. I think Result is the common name for this monad:
type Result e v = Ok v | Err e
https://en.wikipedia.org/wiki/Result_type