null instead of ==
Comparing the lists with == requires elements to be comparable (denoted as Eq a). Prelude> :t (==[]) (==[]) :: (Eq a) => [a] -> Bool For example, [sin] == [] won’t work, since you can’t compare functions. It might seem stupid, but the type system must judge type of an expression without looking at its … Read more