title: Instance of Arbitrary for custom list-like type
body: <p>I have following datatype(like a list):</p>
  
  <pre><code>  data List a =
        Nil
      | Cons a (List a)
      deriving (Eq, Show)
  </code></pre>
  
  <p>and created an instance for <code>Monoid</code>:</p>
  
  <pre><code>  instance Monoid (List a) where
      mempty = Nil
      mappend Nil ys = ys
      mappend (Cons x xs) ys = Cons x (mappend xs ys) 
  </code></pre>
  
  <p>I try to write an instance for <code>Arbitrary</code> for testing latter but could not complete it:</p>
  
  <pre><code>  instance Arbitrary a =&gt; Arbitrary (List a) where
      arbitrary = do  
  </code></pre>
  
  <p>Help me please to complete the function. </p>