'subscript' in 'TimePeriodGroup' is not public, which cannot be accessed outside the class.
As a result, the following statement will be failed to compile.
let chain = TimePeriodChain()
chain.append(TimePeriod())
chain[0] // Error: 'subscript' is inaccessible due to 'internal' protection level.
'subscript' in 'TimePeriodGroup' is not public, which cannot be accessed outside the class. As a result, the following statement will be failed to compile.
Any reason why it is internal?