检查可折叠结构是否为空
如果在可折叠结构 t a 中没有元素 a 则 null 返回 True,如果有一个或多个 a 则返回 a。null 为 True 的结构的 length 为 0。
ghci> null []
True
ghci> null [14, 29]
False
ghci> null Nothing
True
ghci> null (Right 'a')
False
ghci> null ('x', 3)
False
null 被定义为等同于:
class Foldable t where
    -- ...
    null::t a -> Bool
    null = foldr (\_ _ -> False) True