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

June Kim juneaftn@REDACTED
Wed Mar 28 17:45:20 CEST 2007


"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.



More information about the erlang-questions mailing list