|
|
|
|
|
by hopp_check
4573 days ago
|
|
How difficult will code be to read if implicit operations are happening without any mention of the language construct executing them?
As far as this goes, Haskell's Maybe monad is the simplest system I've ever seen: let x = Just 3 in
do
value <- x
guard (value > 1)
return (value * 4)
If x was 'Nothing' then the whole operation would short circuit and 'Nothing' would be returned. If the guard fails, then 'Nothing' is returned. |
|