Copy link to clipboard
Copied
Hello, all,
Just a quick question about ListMap. According to the Adobe Help page, ListMap "Iterates over every entry of the list and calls the closure function to work on the item of the list."
I'm curious, though, if break will break out of the iteration. If ListMap is just a shortcut to a loop, then break would break out of that loop. But if ListMap is something else, then maybe break won't work?
Just curious.
V/r,
^ _ ^
Hi WolfShade,
When the documentation says, "Iterates over every entry of the list and calls the closure function to work on the item of the list", it indeed means ListMap will loop through the list. However, the implementation of ListMap doesn't offer any opportunity to include a break.
Including break within the closure won't work for the map as a whole. That is because the map is designed to iterate over every entry of the list.
Copy link to clipboard
Copied
Hi WolfShade,
When the documentation says, "Iterates over every entry of the list and calls the closure function to work on the item of the list", it indeed means ListMap will loop through the list. However, the implementation of ListMap doesn't offer any opportunity to include a break.
Including break within the closure won't work for the map as a whole. That is because the map is designed to iterate over every entry of the list.
Copy link to clipboard
Copied
AH! I was wondering why break wouldn't work in ListMap, I'm assuming same for ArrayMap.
Thank you for the explanation.
V/r,
^ _ ^