-- file: ch03/ListADT.hs
-- From chapter 3, http://book.realworldhaskell.org/read/defining-types-streamlining-functions.html

data List a = Cons a (List a)
    | Nil
    deriving (Show)

fromList (x:xs) = Cons x (fromList xs)
fromList [] = Nil
