Seeding
Optimisation: avoid constructing unnecessary chains when determining startswith/endswith a chain.
Optimisation: Manually iterate for equality to allow for early termination
Memoize lengths, custom sequence comparison seems faster? Don't check for presence of key, too slow.