Why can't `testListMap` and `testItemMap` both call a helper function that encapsulates most of this logic (and just  default `undoLeftBy` to `0`)?