I think I’ll use this in the end:
iter_pow(it::It, ::Val{n}) where {It <: Any, n} =
Iterators.product(
ntuple(
let it = it
i -> it
end,
Val(n))...)
I think I’ll use this in the end:
iter_pow(it::It, ::Val{n}) where {It <: Any, n} =
Iterators.product(
ntuple(
let it = it
i -> it
end,
Val(n))...)