{- Carrie's Candy Bowl, Code Skeleton
   H. Conrad Cunningham
   
1234567890123456789012345678901234567890123456789012345678901234567890

2022-03-01: Derived from previous solution

Notes:

-   Consider the standard Prelude functions studied

-   Other Haskell libraries may be useful Data.List, Data.Map

-}

module CarrieCandyBowl
  ( CandyBowl(..), newBowl, putIn, takeOut, isEmpty, size, howMany,
    has, eqBowl, inventory, restock, combine, difference, rename
  )
where

-- May need to import various optional modules from Haskell library
--     for some implementations
-- import Data.List ( sort, group, (\\) )
-- import qualified Data.Map.Strict as M


-- Candy bowl data representation--a few possibilities
-- data CandyBowl a = Bowl [a] deriving Show
-- data CandyBowl a = Bowl [(a,Int)] derving Show
-- data CandyBowl a = Bowl (M.Map a Int) deriving Show -- from Data.Map

-- Remove comments from implemented type signatures below

-- Exercise #1
-- newBowl :: (Ord a,Show a) => CandyBowl a

-- Exercise #2
-- isEmpty :: (Ord a,Show a) => CandyBowl a -> Bool

-- Exercise #3
-- putIn :: (Ord a,Show a) => CandyBowl a -> a -> CandyBowl a

-- Exercise #4
-- has :: (Ord a,Show a) => CandyBowl a -> a -> Bool

-- Exercise #5
-- size :: (Ord a,Show a) => CandyBowl a -> Int

-- Exercise #6
-- howMany :: (Ord a,Show a) => CandyBowl a -> a -> Int

-- Exercise #7
-- takeOut :: (Ord a,Show a) => CandyBowl a -> a -> Maybe (CandyBowl a)

-- Exercise #8
-- eqBowl :: (Ord a,Show a) => CandyBowl a -> CandyBowl a -> Bool

-- Exercise #9                            
-- inventory ::(Ord a,Show a) => CandyBowl a -> [(a,Int)]

-- Exercise #10
-- restock :: (Ord a,Show a) => [(a,Int)] -> CandyBowl a

-- Exercise #11
-- combine :: (Ord a,Show a) => CandyBowl a -> CandyBowl a -> CandyBowl a

-- Exercise #12
-- difference :: (Ord a,Show a) => CandyBowl a -> CandyBowl a -> CandyBowl a

-- Exercise #13
-- rename :: (Ord a,Show a) => CandyBowl a -> (a -> b) -> CandyBowl b
