我有一個關於Erlang函數的問題。看到代碼在Erlang的外殼:關於Erlang函數,特別是函數的標識符
1> F1 = fun() -> timer:sleep(1000) end. #Fun<erl_eval.20.111823515> 2> F2 = fun() -> io:format("hello world~n", []) end. #Fun<erl_eval.20.111823515>
F1和F2是不同的,但爲什麼他們都具有標識符#Fun<erl_eval.20.111823515>
?這些神奇數字是什麼意思?
有在ERTS Manual一個段落,說:
When interpreting the data for a process, it is helpful to know that anonymous
function objects (funs) are given a name constructed from the name of the
function in which they are created, and a number (starting with 0) indicating
the number of that fun within that function.
我也不能趕上這一段的意思,可以請你解釋一下嗎?