浏览代码

Update Lambda.hx

fix mapi
Mark Knol 6 年之前
父节点
当前提交
cd03569831
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      std/Lambda.hx

+ 1 - 1
std/Lambda.hx

@@ -75,7 +75,7 @@ class Lambda {
 		The order of elements is preserved.
 		If `f` is null, the result is unspecified.
 	**/
-	public static inline function mapi<A, B>(it:Iterable<A>, f:(index:A, item:B) -> B):Array<B> {
+	public static inline function mapi<A, B>(it:Iterable<A>, f:(index:Int, item:B) -> B):Array<B> {
 		var i = 0;
 		return [for (x in it) f(i++, x)];
 	}