Keep getting matching error in haskell when testing function : <blockquote>
  <p>this is the function</p>
</blockquote>

<pre><code>toRevDigits :: Integer -&gt; [Integer]
toRevDigits 0 = []
toRevDigits x
    | x&lt;0 = []
    | otherwise = lastDigit x:(toRevDigits (dropLastDigit x))
</code></pre>

<blockquote>
  <p>this is the test</p>
</blockquote>

<pre><code>testRevDigits :: (Integer, [Integer]) -&gt; Bool
testRevDigits (n, [d]) = toRevDigits n ==[n]

ex2Tests :: [Test]
ex2Tests = [Test "toRevDigits test" testRevDigits
            [(321,[1,2,3]), (0,[]), ((-17),[])]
           ]
</code></pre>

<blockquote>
  <p>this is the error</p>
</blockquote>

<pre><code>*** Exception: LAB8Tests.hs:27:1-44: Non-exhaustive patterns in function         testRevDigits
</code></pre>

<blockquote>
  <p>how can i fix the tester to function to make it work?</p>
</blockquote>
