linear :: Polynomial -> Bool
linear (Polynomial p) = (maximum (lengths ++ [0])) < 2 where
    lengths = map (\(Monomial _ v) -> length v) p
linear :: Polynomial -> Bool
linear (Polynomial p) = (maximum (lengths ++ [0])) < 2 where
    lengths = map (\(Monomial _ v) -> length v) p
linear (Polynomial p) = (maximum (lengths ++ [0])) < 2 where
    lengths = map (\(Monomial _ v) -> length v) p