This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Data.Map as DM | |
data Product = Product String Float deriving (Show) | |
type ProductMap = DM.Map String [Product] | |
type DiscountTimes = (ProductMap -> Int) | |
data Discount = Discount Float DiscountTimes | |
products :: [Product] | |
products = milk ++ marsBars | |
where milk = replicate 7 $ Product "milk" 1.30 |
NewerOlder