foo x = case x ofis same to
Just x -> ...
Nothing -> ...
foo (Just x) = ...
foo (Nothing) = ...
case mbx ofis same to
Just x
| x > 10 -> ...
| x < 0 -> ...
| otherwise -> ...
Nothing -> ...
foo (Just x)
| x > 10 = ...
| x < 0 = ...
| otherwise = ...
foo (Nothing) = ...
댓글 없음:
댓글 쓰기