[erlang-questions] reference a fun from its atom name

Zabrane Mickael <>
Sun Jun 17 19:44:54 CEST 2012


fun M:F/A

Sent from my iPhone

Le 17 juin 2012 à 18:11, Roberto Ostinelli <> a écrit :

> 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.
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120617/30cb739d/attachment.html>


More information about the erlang-questions mailing list