package com.correx.core.inference

import com.correx.core.events.events.StoredEvent
import com.correx.core.sessions.projections.Projection

class InferenceProjector(
    private val reducer: InferenceReducer = DefaultInferenceReducer()
) : Projection<InferenceState> {
    override fun initial(): InferenceState = InferenceState(emptyList())

    override fun apply(
        state: InferenceState,
        event: StoredEvent
    ): InferenceState = reducer.reduce(state, event)
}
