argmax using Functor and Reducible