julia> using Transducers, Test
julia> x = randn(10);
julia> iter = x |> Map(identity);
julia> @inferred collect(iter);
julia> @inferred tcollect(iter);
ERROR: return type Vector{Float64} does not match inferred return type Any
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] top-level scope
@ REPL[20]:1
julia> @inferred dcollect(iter);
ERROR: return type Vector{Float64} does not match inferred return type Any
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] top-level scope
@ REPL[21]:1
Is there a way to make them inferrable?