reduce inner function's parameter(last)

Fix minmax_element's Complexity