I want to write a function to output the entire contents of a list. not sure of how to do so...This is my list i want to output
type Title = String type Director = String type Year = Int type Fan = String data Film = Film Title Director Year [Fan] deriving Show -- List of films testDatabase :: [Film] testDatabase = [(Film "Casino Royale" "Martin Campbell" 2006 ["Garry", "Dave", "Zoe"]) ] ------- I know this isnt right but this is what I have so far listFilms :: [Film] -> [Film] listFilms (film@(Film title director year fans) : films) = putStrLn . show film I know to use show and putStrLn but I just don't know how to put them into the function correctly thank you. -- View this message in context: http://www.nabble.com/displaying-conetents-of-a-list-tp23470633p23470633.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe