# Withprogress for Folds.jl

**URL:** <https://discourse.julialang.org/t/withprogress-for-folds-jl/87212>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 13, 2022, 1:16pm UTC](https://discourse.julialang.org/t/withprogress-for-folds-jl/87212 "2022-09-13T13:16:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joeldahne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joeldahne/32/45861_2.png) [@joeldahne](https://discourse.julialang.org/u/joeldahne)\
**Post date:** [September 13, 2022, 1:16pm UTC](https://discourse.julialang.org/t/withprogress-for-folds-jl/87212/1 "2022-09-13T13:16:46Z")

</div>

I have been using `Folds.jl` for some computations and wanted to add a progress bar. I founds a `withprogress` function in `Transducers.jl` but it doesn’t seem to work with `Folds.jl`, at least not directly. This works

```julia
using Folds, Transducers
1:100 |> Map(x -> begin sleep(0.05); x; end) |> Folds.collect

```

but if I add `withprogress`

```julia
1:100 |> withprogress |> Map(x -> begin sleep(0.05); x; end) |> Folds.collect

```

I get an error

```julia
ERROR: MethodError: no method matching size(::Transducers.ProgressLoggingFoldable{UnitRange{Int64}})

```

Is there some way to get the progress meter to work with `Folds.jl`? From what I can tell I could switch to using `Transducers.jl` directly and have it work, but I prefer the API of `Folds.jl`.
