Exercise 3.3: Implemented the drop function with tests.