import Base.values, Base.count, Base.sum
import Base.getindex, Base.setindex!
import Base.extrema, Base.maximum, Base.minimum
import Statistics.mean, Statistics.var, Statistics.std
import Statistics.median, Statistics.quantile
abstract type Results end
abstract type Aggregation <: Results end
abstract type SimpleStats <: Aggregation end
mutable struct StoredValues{T} <: Results
values::Vector{T}
loc::Int
end
mutable struct Sum{T} <: Aggregation
n::Int
sum::T
end
mutable struct BinomialStats{T} <: SimpleStats
n::Int
sum::T
end
mutable struct NormalStats{T} <: SimpleStats
n::Int
sum::T
sumSq::T
min::T
max::T
end