Rewrite zipwithindex with the Seq.mapi