Y
Hacker News
new
|
ask
|
show
|
jobs
by
kobeya
3234 days ago
Or to encapsulate a nil in a Maybe monad, so that you only have to deal with it in contexts where you explicity denote acceptance of nils. Then the type system won't let you get away with ignoring the possibility of a nil.
1 comments
p4lindromica
3233 days ago
you can do a maybe monad without nil types by substituting nil with a single-valued singleton type
link