Arity of funs

matthias@REDACTED matthias@REDACTED
Wed Mar 15 11:59:00 CET 2000


 > There is no way to find out the arity of a fun.

I've put a .beam file up at 

     http://www.ericsson.se/cslab/~mml/besserwisser.beam

Here's what it does:

4> besserwisser:arity(fun(_) -> a end).
1
5> besserwisser:arity(fun() -> a end). 
0
6> besserwisser:arity(fun(p,q,r) -> a end).
3

How it works is a secret. Looking in the local filesystem is cheating,
Björn.

Matthias




More information about the erlang-questions mailing list