Questioning the Correctness of `List.map` Implementation
I might be missing something, but I don't think that the implementation for
Reading the source (https://github.com/Effect-TS/effect/blob/e0ef64102b05c874e844f680f53746821609e1b6/src/List.ts#L734-L752) for
List.map is correct? The type signature says that I can pass a function with the following signature: f: (a: any, i: number) => any[] and I inferred that i must be an index parameter, as that is the same functionality as in JS. However, look at these example cases:Reading the source (https://github.com/Effect-TS/effect/blob/e0ef64102b05c874e844f680f53746821609e1b6/src/List.ts#L734-L752) for
List.map it seems like it only ever calls the mapping function with one parameter which makes sense why the index is always undefined. Is the known/desired, i.e is the implementation correct but the type signature wrong. Or is it a bug, i.e the type signature is correct but the implementation is wrong? I am willing and I think I could submit a PR if this is indeed a bug.