alphagov/backdrop — pull request #219 by robyoung (2014-01-06 09:45:52+00:00)
Title: Tidy nested merge

- Factor the collect functions out into separate functions rather than
switching so that they can be more easily extended and indepdendently
tested.
- Move the collect function tests into doctests. They're small and
focused so it makes sense for the the tests to be close to the code.
- Make `remove_key` a pure function and remove redundant `remove_collected_key`