Frame
A frame is a List of Candles or just [Candle]
Ideally, it should be a dependent type, parameterized by its time
interval, so the Frames of different sizes would be strictly separated.
This requirement can be relaxed and a Frame must be an ADT.
Conceptually, it is an ordered sequence if Candles. Technically it
is a List (an instance of literally all the standard type-classes).
The ordering is defined by timestamps of Candles at the time of creation.
An interval
A Frame can be seen as an interval between two timestamps.
It is between the opening timestamp of the first Candle in a sequece and the closing timestamp of the last Candle in a sequence.
Immutable
Candles are Frames are immutable.
Functions
There will be a set of functions which take a Frame and look inside Candles, just like map and fold do.
They should be private to the Frame module and use Candle imports.