# Scrap your iteration combinators

**URL:** <https://discourse.haskell.org/t/scrap-your-iteration-combinators/12024>\
**Category:** Links\
**Created:** [May 6, 2025, 9:40am UTC](https://discourse.haskell.org/t/scrap-your-iteration-combinators/12024 "2025-05-06T09:40:26Z")\
**Posts on this page:** 1\
**Showing post:** 34

<div class="post-metadata">

**Author:** ![prophet](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/prophet/32/5031_2.png) [@prophet](https://discourse.haskell.org/u/prophet)\
**Post date:** [May 12, 2025, 9:05pm UTC](https://discourse.haskell.org/t/scrap-your-iteration-combinators/12024/34 "2025-05-12T21:05:58Z")

</div>

You don’t even need any put/get/runState operations to implement `mapAccumLM`. Modulo newtypes (and argument order), it is literally just `traverse`/ `for` on `StateT`

> **[gabby (@fullmoon.id)](https://bsky.app/profile/fullmoon.id/post/3lolqwuokk22j)**
>
> No put/get/runState required. It's literally just \`coerce\` (modulo order of inputs/outputs)

---

_[View the full topic](https://discourse.haskell.org/t/scrap-your-iteration-combinators/12024)._
