Findmin/max and generators

This is incorrect; this code is not calculating the argmin, but instead the minimum argument.