[erlang-questions] reference a fun from its atom name
Roberto Ostinelli
roberto@REDACTED
Sun Jun 17 18:11:30 CEST 2012
Dear list,
is it possible to reference a fun from its atom name? For instance:
1> eunit:test({generator, fun hello_test_/0}).
-> everything is ok.
2> FunName = 'hello_test_/0'.
'hello_test_/0'
3> eunit:test({generator, fun FunName}).
* 1: syntax error before: '}'
Any ideas?
Thank you,
r.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120617/76e9555d/attachment.htm>
More information about the erlang-questions
mailing list