newbie question about fun expressions

Jose Balado JMBALADO@REDACTED
Sat Sep 17 19:06:35 CEST 2005


Hi, I have a question:

In "Erlang reference manual" 6.17 Fun Expressions is says that the following 
fun expressions are also allowed: 

fun Name/Arity
fun Module:Name/Arity

 So I tried "fun Name/Arity" like this:

46> lists:map(fun is_atom/1,[peter,1]).
[true,false]
47>  

But "fun Module:Name/Arity" seems that does not work:

47> lists:map(fun lists:reverse/1,[peter,1]).
** 1: syntax error before: ':' **
47> 

 What am I doing wrong?

Thanks.

Best regards,
Jose






More information about the erlang-questions mailing list