MikeInnes / Lazy.jl

I was gonna maintain this package, but then I got high
Other
470 stars 54 forks source link

StackOverflowError when using LazyLists. #42

Open jcrichton opened 8 years ago

jcrichton commented 8 years ago

Julia version 0.4.1; release x86_64-w64-mingw32; Windows 7; Lazy v"0.10.1".

julia> import Lazy

julia> xs = Lazy.constantly(0);

julia> ys = Lazy.drop(30000, xs);

julia> Lazy.first(ys)
ERROR: StackOverflowError:
 in constantly at C:\bin\.julia\v0.4\Lazy\src\liblazy.jl:18
 in anonymous at C:\bin\.julia\v0.4\Lazy\src\Lazy.jl:84
 in rest at C:\bin\.julia\v0.4\Lazy\src\Lazy.jl:80
 in anonymous at C:\bin\.julia\v0.4\Lazy\src\Lazy.jl:84
 in first at C:\bin\.julia\v0.4\Lazy\src\Lazy.jl:80 (repeats 28629 times)

julia> xs = Lazy.range();

julia> ys = Lazy.dropwhile(x -> x < 30000, xs);

julia> Lazy.first(ys)
ERROR: StackOverflowError:
 in anonymous at C:\bin\.julia\v0.4\Lazy\src\Lazy.jl:84
 in isempty at C:\bin\.julia\v0.4\Lazy\src\Lazy.jl:80
 in anonymous at C:\bin\.julia\v0.4\Lazy\src\Lazy.jl:84
 in first at C:\bin\.julia\v0.4\Lazy\src\Lazy.jl:80 (repeats 28629 times)