# Ets.fun2ms needs ms\_transform error

**URL:** <https://forum.elixirforum.com/t/ets-fun2ms-needs-ms-transform-error/11959>\
**Category:** Questions\
**Tags:** troubleshooting\
**Created:** [January 26, 2018, 11:51pm UTC](https://forum.elixirforum.com/t/ets-fun2ms-needs-ms-transform-error/11959 "2018-01-26T23:51:45Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kokolegorille](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kokolegorille/32/4784_2.png) [@kokolegorille](https://forum.elixirforum.com/u/kokolegorille)\
**Post date:** [January 27, 2018, 12:12am UTC](https://forum.elixirforum.com/t/ets-fun2ms-needs-ms-transform-error/11959/3 "2018-01-27T00:12:27Z")

</div>

Thank You for your response.

I tried this simple module, it fails with the same error. But if I type each line in the console, it’s working.

```elixir
defmodule NextEngine.Koko do
  def do_work() do
    :ets.new(:checks, [:set, :protected, :named_table])
    fun = :ets.fun2ms(fn check_in -> check_in end)
    :ets.select(:checks, fun)
    :ets.delete(:checks)
  end
end

iex> NextEngine.Koko.do_work()
** (exit) exited in: :ets.fun2ms(:function, :called, :with, :real, :fun, :should, :be, :transformed, :with, :parse_transform, :or, :called, :with, :a, :fun, :generated, :in, :the, :shell)
    ** (EXIT) :badarg
    (stdlib) ets.erl:580: :ets.fun2ms/1
    lib/next_engine/koko.ex:4: NextEngine.Koko.do_work/0

```

I probably need to translate this line in Elixir, but I don’t know yet how to do it.

```erlang
-include_lib("stdlib/include/ms_transform.hrl").

```

---

_[View the full topic](https://forum.elixirforum.com/t/ets-fun2ms-needs-ms-transform-error/11959)._
