Since there is no filter
for Tuple
s, eg
julia> t = (1, 2, 3)
(1, 2, 3)
julia> filter(isodd, t)
ERROR: MethodError: no method matching filter(::typeof(isodd), ::Tuple{Int64,Int64,Int64})
Closest candidates are:
filter(::Any, ::Array{T,1} where T) at array.jl:2352
filter(::Any, ::BitArray) at bitarray.jl:1637
filter(::Any, ::AbstractArray) at array.jl:2313
...
Stacktrace:
[1] top-level scope at none:0
should I convert to vectors and back,
julia> tuple(filter(isodd, [t...])...)
(1, 3)
or is there a better option?