Say I have
x = [1 2] y = [10, 20, 30] f(a,b) = a+b+0.5
I want an iterator that goes through the elements of
f.(x,y) (11.5, 21.5, 31.5, …) without allocating the output array. Bonus points for an iterator that can also give the indices of
y, and their nonexistent broadcasted output per iteration: (1,1,1), (1,2,2), (1,3,3), … That last bit might be a bit trickier for arrays that don’t allow linear indexing.