CS 119 Lab 10 – Abstract Data Types: Bags (Multisets)
Objectives
Perform the following tasks in the order given.
| Assignment: Write a function sortBag :: (Ord a) => Bag a -> [a] which returns a list of the items in the bag in sorted order. You should be able to do this using only the given operations on bags. |
| Assignment: What is the efficiency of the sortBag function? |