mapWithIndex

mapWithIndex :: (a -> Int -> b) -> [a] -> [b]
mapWithIndex f xs = zipWith f xs [0..]