怎么写在函数内的匿名函数
f2(N) when N < 2 -> N;f2(N) -> f2(N - 1) + f2(N - 2).怎么写在函数内的匿名函数 (f3 == f2)f3(N) -> fun ...
(fun(X) when X =:= "Chinaunix" -> io_lib:format("~p",);(_) -> "DENY" end)("Chinaunix"). 46> (fun () when Age > 42 -> io:format("You are old~n"); () -> io:format("You are young~n") end)().
You are old
ok
47> Age.
99
48> 回复 3# shijiang1130
图哥?你有一个明确的例子?
f2(40) ==> 102334155
f3(40) ==> 102334155
图哥++ {:yxh57:}{:yxh57:}
页:
[1]