[erlang-questions] anyway to make recursion inside anonymous funs?

VAUCHER Laurent VAUCHER@REDACTED
Wed Mar 28 18:03:10 CEST 2007


http://en.wikipedia.org/wiki/Anonymous_recursion  ?


-----Message d'origine-----
De : erlang-questions-bounces@REDACTED [mailto:erlang-questions-bounces@REDACTED] De la part de June Kim
Envoyé : 28 March 2007 17:45
À : erlang-questions@REDACTED
Objet : [erlang-questions] anyway to make recursion inside anonymous funs?

"fun" expressions can be used to declare a function. Can it make a recursive call inside?

That is,

Can I somehow declare the following with callself, which is an imaginary functionality that calls the anonymous function itself?

fun(X) -> receive {P,V} -> P!(X+V), callself(X+V) end end.
_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://www.erlang.org/mailman/listinfo/erlang-questions






More information about the erlang-questions mailing list