Why does this work:
julia> sum(i for i in 1:3)
6
but not this:
julia> cumsum(i for i in 1:3)
ERROR: MethodError: no method matching cumsum(::Base.Generator{UnitRange{Int64},##13#14})
Why does this work:
julia> sum(i for i in 1:3)
6
but not this:
julia> cumsum(i for i in 1:3)
ERROR: MethodError: no method matching cumsum(::Base.Generator{UnitRange{Int64},##13#14})