by hopp_check · 12y ago · 0 comments
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.No comments yet.