# Map.update inside for loop

**URL:** <https://forum.elixirforum.com/t/map-update-inside-for-loop/41295>\
**Category:** Resources Chat/Questions\
**Tags:** maps, loop\
**Created:** [July 28, 2021, 9:50am UTC](https://forum.elixirforum.com/t/map-update-inside-for-loop/41295 "2021-07-28T09:50:09Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![kalindkaria](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kalindkaria/32/23652_2.png) [@kalindkaria](https://forum.elixirforum.com/u/kalindkaria)\
**Post date:** [July 28, 2021, 11:06am UTC](https://forum.elixirforum.com/t/map-update-inside-for-loop/41295/7 "2021-07-28T11:06:29Z")

</div>

Thanks @LostKobrakai and @kokolegorille !  
I missed out this `:reduce` option in Comprehensions. I am able to recall now.  
Documentation about `:reduce` for anyone to refer in future:

> **[Kernel.SpecialForms — Elixir v1.20.2](https://elixir.hexdocs.pm/Kernel.SpecialForms.html)**

---

_[View the full topic](https://forum.elixirforum.com/t/map-update-inside-for-loop/41295)._
