[erlang-questions] Orthogonality and Principle of least surprise Was: chained functions

Alisdair Sullivan alisdairsullivan@REDACTED
Wed Feb 1 15:04:31 CET 2012


functions in erlang are identified by their name and their arity

'F = module:fun()' is ok because the arity, 0, is implied by the arguments

'F = module:fun' is not okay because it does not refer to a specific function. you need to tell the compiler which function you wish to call. hence the 'fun module:fun/n' syntax


More information about the erlang-questions mailing list