The third parameter, I would argue, is a bit wired to begin with. If you need the entire collection, then you are probably doing more than map(), and if you really need it, then you could probably just close over it. But with that somewhat wired third parameter removed, you are right, that is something you could easily run into in a typed language.