1
当阅读github的Project gproc的源代码文件“gproc_lib.erl”时,我遇到了一些问题。 我在哪里可以找到这个语句语法的一些相关的参考文档?gproc_lib.erl文件中下列语句的含义是什么?
check_option_f(ets_options) -> fun check_ets_option/1; **%<----**What's the meaning of this** statement**?
check_option_f(server_options) -> fun check_server_option/1.
check_ets_option({read_concurrency , B}) -> is_boolean(B);
check_ets_option({write_concurrency, B}) -> is_boolean(B);
check_ets_option(_) -> false.
check_server_option({priority, P}) ->
%% Forbid setting priority to 'low' since that would
%% surely cause problems. Unsure about 'max'...
lists:member(P, [normal, high, max]);
check_server_option(_) ->
%% assume it's a valid spawn option
true.
谢谢。如果您可以告诉我“http://www.erlang.org/doc/reference_manual/users_guide.html”这本书的哪一页与此主题相关,那会更好。 – 2012-02-23 13:01:39
已添加! http://www.erlang.org/doc/reference_manual/expressions.html#funs – aronisstav 2012-02-23 16:02:31