Ets.fun2ms needs ms_transform error

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.

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.

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