diff --git a/src/docs/foldl.md b/src/docs/foldl.md index 6c21148..269b877 100644 --- a/src/docs/foldl.md +++ b/src/docs/foldl.md @@ -13,4 +13,11 @@ julia> foldl.(tuple, grouped(isodd, [0, 7, 3, 1, 5, 9, 4, 3, 0, 5])) Transducers.GroupByViewDict{Bool,Any,…} with 2 entries: false => ((0, 4), 0) true => ((((((7, 3), 1), 5), 9), 3), 5) + +julia> using OnlineStats + +julia> foldl.(Ref(Mean()), grouped(isodd, [0, 7, 3, 1, 5, 9, 4, 3, 0, 5])) +Transducers.GroupByViewDict{Bool,Mean{Float64,EqualWeight},…} with 2 entries: + false => Mean: n=3 | value=1.33333 + true => Mean: n=7 | value=4.71429 ``` diff --git a/src/docs/reduce.md b/src/docs/reduce.md index 7fd4b4a..4ac27b8 100644 --- a/src/docs/reduce.md +++ b/src/docs/reduce.md @@ -13,4 +13,11 @@ julia> reduce.(max, grouped(isodd, [0, 7, 3, 1, 5, 9, 4, 3, 0, 5])) Transducers.GroupByViewDict{Bool,Int64,…} with 2 entries: false => 4 true => 9 + +julia> using OnlineStats + +julia> reduce.(Ref(Mean()), grouped(isodd, [0, 7, 3, 1, 5, 9, 4, 3, 0, 5])) +Transducers.GroupByViewDict{Bool,Mean{Float64,EqualWeight},…} with 2 entries: + false => Mean: n=3 | value=1.33333 + true => Mean: n=7 | value=4.71429 ```