julia> collect(let x
(x for y in 1:6
if try
x = y
@assert x % 2 == 0
true
catch err
if ! (err isa AssertionError)
rethrow()
end
false
end)
end)
3-element Array{Int64,1}:
4
6
6
julia> versioninfo()
Julia Version 0.6.4
Commit 9d11f62bcb (2018-07-09 19:09 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=16)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
julia> collect(let x
(x for y in 1:6
if try
x = y
@assert x % 2 == 0
true
catch err
if ! (err isa AssertionError)
rethrow()
end
false
end)
end)
3-element Array{Int64,1}:
2
4
6
julia> versioninfo()
Julia Version 0.7.0-beta2.48
Commit c6a949a9c3 (2018-07-19 18:28 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, haswell)