# Why does \`elem/2\` exist?

**URL:** <https://forum.elixirforum.com/t/why-does-elem-2-exist/64854>\
**Category:** Questions\
**Tags:** functions\
**Created:** [July 11, 2024, 3:04am UTC](https://forum.elixirforum.com/t/why-does-elem-2-exist/64854 "2024-07-11T03:04:54Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![sodapopcan](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sodapopcan/32/34668_2.png) [@sodapopcan](https://forum.elixirforum.com/u/sodapopcan)\
**Post date:** [July 11, 2024, 3:24pm UTC](https://forum.elixirforum.com/t/why-does-elem-2-exist/64854/10 "2024-07-11T15:24:43Z")

</div>

> [@v0idpwn](#):
>
> With regards to elem/2 in pipelines, maybe a credo check for this would be useful.

I don’t actually have a problem with it in any apps I work on, even at work, was just generally looking for a case where pattern matching isn’t better. Though it could actually be a fun but jarring addition to [recode](https://github.com/hrzndhrn/recode) 😅

---

_[View the full topic](https://forum.elixirforum.com/t/why-does-elem-2-exist/64854)._
