I have a function in Haskell which finds the maximum value of an exponentiation from a list:
prob99 = maximum $ map (\xs -> (head xs)^(head (tail xs))) numbers
What I need to find is the location of this maximum value in the resultant list. How would I go about this?
Edit: I found a solution that goes like this:
n = [[519432,525806],[632382,518061]....
prob99b [a,b] = b* (log a)
answer = snd $ maximum (zip (map prob99b n) [1..])