Pure functional EventStream monad implementation