Closed DrChainsaw closed 4 years ago
julia> ft = maketree("a" => [(name="b", value=1)]) a/ └─ b (Int64) julia> reducevalues(+, ft[r"c"]) ERROR: StackOverflowError: Stacktrace: [1] Array at .\boot.jl:406 [inlined] [2] similar at .\array.jl:379 [inlined] [3] getindex at .\array.jl:817 [inlined] [4] assocreduce(::FileTrees.var"#79#80"{typeof(+)}, ::Array{Any,1}) at ...\FileTrees\2lYLo\src\values.jl:72 (repeats 32641 times) [5] reducevalues(::Function, ::FileTree; associative::Bool, lazy::Nothing) at ...\FileTrees\2lYLo\src\values.jl:61 [6] reducevalues(::Function, ::FileTree) at ...\FileTrees\2lYLo\src\values.jl:59 [7] top-level scope at REPL[27]:1 [8] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1088
Not sure if there exist a universally true answer, but maybe it should just have the same behaviour as reduce in Base.
Not sure if there exist a universally true answer, but maybe it should just have the same behaviour as reduce in Base.