Implementing mapi and iteri.

I didn't implement foldi since one can just pass an index in the accumulator.