A snapshot is the dataset resulting from walking through the log start to end and taking the latest data for each element.
type Snapshot = Dict ID Entry
When the snapshot is for the latest change the elements are called records.
A snapshot can be seen as a function
collect that derives the snapshot from
a given log:
collect : Log -> Snapshot
Let log be the full log to parse.
Let result be an empty associative array.
Foreach entry in the log:
If the entry has bigger number than the one in result or it doesn't exist, add (key, entry) to result.
Otherwise, do nothing.
To get a previous snapshot, take an slice of the log from the start.
A snapshot is sometimes referred as version of the dataset.