in reply to Gap-filling lists

This sounds very close, though not identical, to diets (discrete interval encoding trees).

(There's a nice Haskell implementation available.)