# EEP 77: comprehension assignments

**URL:** <https://erlangforums.com/t/eep-77-comprehension-assignments/4389>\
**Category:** Proposals: RFC\
**Tags:** erlang-otp, eep\
**Created:** [January 14, 2025, 7:00pm UTC](https://erlangforums.com/t/eep-77-comprehension-assignments/4389 "2025-01-14T19:00:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardc](https://erlangforums.com/user_avatar/erlangforums.com/richardc/32/1043_2.png) [@richardc](https://erlangforums.com/u/richardc)\
**Post date:** [January 14, 2025, 7:00pm UTC](https://erlangforums.com/t/eep-77-comprehension-assignments/4389/1 "2025-01-14T19:00:20Z")

</div>

Adds assignments `Pattern = Expression` to comprehension qualifier lists.

[https://github.com/erlang/eep/pull/74](https://github.com/erlang/eep/pull/74)

---

<div class="post-metadata">

**Author:** ![filmor](https://erlangforums.com/user_avatar/erlangforums.com/filmor/32/988_2.png) [@filmor](https://erlangforums.com/u/filmor)\
**Post date:** [January 16, 2025, 2:38pm UTC](https://erlangforums.com/t/eep-77-comprehension-assignments/4389/2 "2025-01-16T14:38:23Z")

</div>

This is very nice! I just checked (because I remembered needing this), we have plenty of really short `lists:map` or `lists:filter`, that would be well suited for comprehensions where it was too annoying to write the filter or result as an express (esp. records).

---

<div class="post-metadata">

**Author:** ![tsloughter](https://erlangforums.com/user_avatar/erlangforums.com/tsloughter/32/418_2.png) [@tsloughter](https://erlangforums.com/u/tsloughter)\
**Post date:** [January 17, 2025, 4:04pm UTC](https://erlangforums.com/t/eep-77-comprehension-assignments/4389/3 "2025-01-17T16:04:52Z")

</div>

Oh!

```erlang
[Z || X <- Ls,
      is_tuple(Y = g(X)),
      Z <- f(Y, h(element(2,Y)))].

```

All these years and I’m still learning new tricks 🙂
