title: Haskell IO can't get the list to loop around a menu function
body: <p>I'm currently making a text based menu system in haskell. I have made a data type called Book where each function edits the list and returns it. However I cannot work out how to make a menu part work where it can edit this list and recurse back around.</p>
  
  <p>Example on what I'm stuck on
  menu works,
  add a book to the list,
  menu then needs to reload the menu so I can display the books with the new addition.</p>
  
  <p>example of menu</p>
  
  <pre><code>menu:: [Book] -&gt; [IO]
  menu books = do
    str &lt;- getLine
    let selectNum = (read str :: Int)
    case selectNum of
       1 -&gt; let sd = addNewBookIO books 
       2 -&gt; displayAllBooksFromYear books
  </code></pre>
  
  <p>example of adding a new book</p>
  
  <pre><code>addNewBookIO :: [Book] -&gt; IO [Book]
  addNewBookIO films =
    do putStr "Film name: " 
       filmTitle &lt;- getLine
       putStr "List all cahr in the Book (separated by commas): "
       cast &lt;- addToStringArray []
       putStr "Year of Realese in the UK: "
       year &lt;- getLine
       let test = (read year :: Int)
       putStr "List all the fans(separated by commas): "
       fans &lt;- addToStringArray [] 
       putStrLn "Your Book has been added"
       let bookList = addbookFilm (Film bookTitle cast test fans) films
       return bookList
  </code></pre>
  
  <p>Any help would be grateful</p>