# How do we map list over list

These do not work, in fact i dont know how index of _ would even work with that, what am i trying to get is result of (4, 3, 2)

Use this in replace:

Because all of the items of your list are 5, the items are same, so the index of all of them are 1.

The selector is any list you can put, so a list in the "item _ of _" the list is just selecting the corresponding items determined by their places or indexes.

Interesting, but you misunderstood me, i meant getting result like this

(pseudo-block)

Oh, I see it, if you didn't change the list, use all the "5"s to get this:

noooo, you dont get it, i need to use reporters from map on each of items from list

This is one way but probably could be simplifed

Wow, thanks, thats exactly what i wanted!

Wait, that doesnt work

you used plus 1 on the bottom

yes i did and expected it to become 6 instead of remaining 5, and the problem is because join input list doesnt work correctly with multiple input blocks

i see now

i made this version and it works, not sure if its the best way to do so

why use join?

made block for it to look nice

now if there is more items of list than list of maps they will just repeat from the start

The fact that all the numbers are 5 makes this hard to debug, because you can't tell which 5 was selected by your algorithm. What I'd suggest as a debugging aid would be to make the list of numbers something like 5,10,15. I know that isn't what you want, but once you get the result you'd expect with those numbers, then change the numbers to 5,5,5.

With all the numbers the same, though, you can't use INDEX OF the way you intend. It finds the first instance of the given value in the list. The conventional way to iterate through the items of MAP is to use NUMBERS FROM:

But of course an even easier way to get that result is just

But all of these candidate solutions are too complicated. What you want to do is map through two lists in parallel. We have a tool for that, in the File Utilities library:

Here's how it's implemented:

Wow, thanks for such a broad answer! Most things I feel like I've done something wrong, or made something harder, and that it could be done easier, or even has a separate block for it, this is one of those cases. Thanks