Question: HASKELL CODING 4. Develop the Haskell function calcSubtotal CartPricesPrice that takes a list of priced items and calculates the sum of the prices (i.e. the
4. Develop the Haskell function calcSubtotal CartPricesPrice that takes a list of priced items and calculates the sum of the prices (i.e. the subtotal). 5. Develop the Haskell function formatAmt String-> Price -str in that takes a label string and a price amount and generates a line of the receipt for that label For example, formatAmt "Total" 18860 generates the string: 6. Develop the Haskell function formatBill Bill -> String that takes a Bill tuple and generates a receipt string
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
