defmodule AnonymousFunctionTest do
@anon fn() -> true end
def anonymous_function,
do: @anon
end
** (ArgumentError) cannot inject attribute @anon into function/macro because cannot escape #Function<0.35353592 in file:iex>. The supported values are: lists, tuples, maps, atoms, numbers, bitstrings, pids and remote functions in the format &Mod.fun/arity
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/ebfb4a3f-23b8-41a3-9412-d2707e477c8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.