Since maximum(itr) supports generators, argmax(itr) should too

I noticed that maximum(i for i = 1:10) works but argmax(i for i=1:10) does not. Any reason for the inconsistency?

Right now, I work around this by writing argmax([i for i=1:10]), but I think supporting the generator syntax is desirable to avoid a temporary array. Thanks!


Likewise, a good idea.

I’ve filed an issue for this. I’ll have a look at how maximum does it and see if it’s obvious what needs to be done here. Thanks for the encouragement!