The History type is used as the state type so as to keep some snapshots of the past, in case data is lost due to a programming error by the application developer. It is an homogenous collection so the argument type has to take care of versionning. To avoid needless reserialization of the past states, the argument type should be a Ref type.
We keep the last n samples inserted, then n samples keeping one out of every two, then n samples keeping one out of every four... Currently n is hard coded to 2.
Changes a transformation on
a into a transformation on 'History a'. Adds a new state into the