concept cost in category haskell

This is an excerpt from Manning's book Get Programming with Haskell.
$ ghc pizza.hs $ ./pizza What is the size of pizza 1 12 What is the cost of pizza 1 15 What is the size of pizza 2 18 What is the cost of pizza 2 20 The 18.0 pizza is cheaper at 7.859503362562734e-2 per square inch
To get a better sense of how do-notation works, let’s try an extended example. You’ll create a command-line tool that asks the user for the size and then the cost of two pizzas, and then tells the user which one is cheaper per square inch. Because you’re using IO now, you can finally create a real, compiled program. You’ll call this one pizza.hs. This program will ask you for the cost and size of two pizzas and tell you which one is the better deal in terms of cost per square inch. Here’s what it’ll look like to compile and run your program:
$ ghc pizza.hs $ ./pizza What is the size of pizza 1 12 What is the cost of pizza 1 15 What is the size of pizza 2 18 What is the cost of pizza 2 20 The 18.0 pizza is cheaper at 7.859503362562734e-2 per square inch
In unit 4, when you first saw do-notation, you briefly touched on the idea that the power of the Monad type class is that it allows you to create different programs by using the same code in different contexts. The example you used in lesson 21 was creating an I/O program that asked a user for information about comparing the costs of two pizzas. Because do-notation works on all members of Monad, you were able to trivially translate this program to work with Maybe types when your values came from Data.Maps rather than IO.
At the end of lesson 21, you saw the following program used to calculate the cost of pizza: