Added mapi method

Same as built-in method `map`, but with an extra index argument.
I don't know if the name `mapi` is a standard, I just used the same name as in [OCaml](http://caml.inria.fr/pub/docs/manual-ocaml/libref/List.html#VALmapi).