Okay thanks, it works! However it has extremely poor performance. I would
love to do this stack allocated.
```
using BenchmarkTools
function subtuple(t::Tuple,i::Integer)
idx = 1:length(t)
idx = setdiff(idx,i)
t[idx]
end
@benchmark subtuple($(1,2,3,4), $1)
```
BenchmarkTools.Trial:
samples: 10000
evals/sample: 10
time tolerance: 5.00%
memory tolerance: 1.00%
memory estimate: 1.33 kb
allocs estimate: 22
minimum time: 1.52 μs (0.00% GC)
median time: 1.69 μs (0.00% GC)
mean time: 1.96 μs (9.07% GC)
maximum time: 323.58 μs (98.21% GC)
On Friday, June 24, 2016 at 4:42:17 PM UTC+2, STAR0SS wrote:
>
> You can do something like that:
>
> t = tuple(1,2,3,4)
>
> function subtuple(t::Tuple,i::Integer)
> idx = 1:length(t)
> idx = setdiff(idx,i)
> t[idx]
> end
>
> subtuple(t,3)
>
> (1,2,4)
>