nothing package:rio

_Nothing targets a () if the Maybe is a Nothing, and doesn't target anything otherwise:
>>> Just 1 ^.. _Nothing
[]
>>> Nothing ^.. _Nothing
[()]
It's not particularly useful (unless you want to use has _Nothing as a replacement for isNothing), and provided mainly for consistency. Implementation:
_Nothing f Nothing = const Nothing <$> f ()
_Nothing _ j       = pure j
The isNothing function returns True iff its argument is Nothing.

Examples

Basic usage:
>>> isNothing (Just 3)
False
>>> isNothing (Just ())
False
>>> isNothing Nothing
True
Only the outer constructor is taken into consideration:
>>> isNothing (Just Nothing)
False