title: In Haskell, why isn't there a TypeClass for things that can act like lists?
body: <p>I'm reading <a href="http://www.learnyouahaskell.com" rel="noreferrer">Learn You a Haskell</a> and I'm wondering why so many things are acting like a list, and nothing in the Prelude is using the native facility of type classes to set this up:</p>
  
  <blockquote>
    <p>"The bytestring version of : is called cons It takes a byte and a bytestring and puts the byte at the beginning. It's lazy though, so it will make a new chunk even if the first chunk in the bytestring isn't full. That's why it's better to use the strict version of cons, cons' if you're going to be inserting a lot of bytes at the beginning of a bytestring."</p>
  </blockquote>
  
  <p>Why isn't there a TypeClass <em>listable</em> or something that offers the <code>:</code> function to unify <code>Data.ByteString</code>, <code>Data.List</code>, <code>Data.ByteString.Lazy</code>, etc? Is there a reason for this, or is this just an element of legacy Haskell? Using <code>:</code> as an example is kind of an understatement, also from LYAH:</p>
  
  <blockquote>
    <p>Otherwise, the bytestring modules have a load of functions that are analogous to those in Data.List, including, but not limited to, head, tail, init, null, length, map, reverse, foldl, foldr, concat, takeWhile, filter, etc.</p>
  </blockquote>