# Functionaly pure message passing

**URL:** <https://forum.elixirforum.com/t/functionaly-pure-message-passing/11173>\
**Category:** Discussions\
**Tags:** otp, genserver\
**Created:** [December 29, 2017, 3:07pm UTC](https://forum.elixirforum.com/t/functionaly-pure-message-passing/11173 "2017-12-29T15:07:42Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![voughtdq](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/voughtdq/32/9633_2.png) [@voughtdq](https://forum.elixirforum.com/u/voughtdq)\
**Post date:** [October 17, 2018, 2:50pm UTC](https://forum.elixirforum.com/t/functionaly-pure-message-passing/11173/16 "2018-10-17T14:50:40Z")

</div>

> [@Crowdhailer](#):
>
> (Not true in every case, e.g. GenServer.reply/2)

Couldn’t you use an arbitrary `{to, tag}`?

i.e.

```elixir
def test_gen_server_call(msg) do
  ref = make_ref()
  Server.handle_call(msg, {self(), ref}, nil)
  receive do
    {^ref, reply} -> assert_this_reply_is_correct(reply)
  end
end
```

---

_[View the full topic](https://forum.elixirforum.com/t/functionaly-pure-message-passing/11173)._
