closure on function argument
Wed May 5 10:16:09 CEST 2010
On May 1, 8:38 pm, Zoltan Lajos Kis <ki...@REDACTED> wrote:
> If I have /F = fun(Y) -> fun(Y) -> ok end end/, and /G = F('z')/, I
> would expect /G/ to be /fun('z') -> ok end/.
> A workaround I found is using guards: /F = fun(Y) -> fun(X) when X == Y
> -> ok end end/.
Just a side note: you must use =:= to get the exact semantics of
fun('z') -> ok end.
More information about the erlang-questions