Open tkf opened 4 years ago
julia> using LazyGroupBy julia> using DataTools julia> foldl.(averaging, grouped(isodd, 1:7)) Transducers.GroupByViewDict{Bool,DataTools.AverageState{Int64},…} with 2 entries: false => AverageState{Int64}(12, 3) true => AverageState{Int64}(16, 4)
If Transducers.complete were called, it'd be something like
Transducers.complete
julia> pairs(ans) |> Map(modifying(second = x -> Transducers.complete(DataTools.merge_state, x))) |> x -> copy(Dict, x) Dict{Bool,Float64} with 2 entries: false => 4.0 true => 4.0
If
Transducers.complete
were called, it'd be something like