小编laa*_*hin的帖子

Erlang - Anonymouos功能

如果我调用test(),它就不起作用.有人可以解释一下吗?

-module(anony).

-export([test/0, test1/0]).

test1() -> "hello".

test() ->
   C = fun(F) -> Val = F(), io:format("~p ", [Val]) end, 
   lists:foreach(debug, [test1]).
Run Code Online (Sandbox Code Playgroud)

erlang anonymous-function

1
推荐指数
1
解决办法
213
查看次数

标签 统计

anonymous-function ×1

erlang ×1