The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Mark Elston (133) [Avatar] Offline
At the end of the coffee cup example in the Unit 1Capstone, the listing in question has:
... where flOz = getOz aCup

The problem is that flOz isn't used in the listing, but ozDiff is, and it isn't defined.
Will Kurt (21) [Avatar] Offline
Thanks for catching this! All the rough drafts are written in literate Haskell so all the code examples compile initially, but occasionally edits get made after the fact that lead to typos like this. Again, thanks so much for your feedback, it really helps!
317529 (6) [Avatar] Offline
Just for the benefit of any other readers who stumble upon this, here's how I adapted this listing to work:

drink aCup ozDrank = if ozDiff >= 0
        then cup ozDiff
        else cup 0
    where ozDiff = (getOz aCup) - ozDrank