用变量做函数名
-module(t).-compile(export_all).
test(Whatever)->
?MODULE:Whatever().
changeme()->
io:format("Look at here").
mybad()->
io:format("mybad"). 1> c(t).
{ok,t}
2> t:
changeme/0 module_info/0module_info/1mybad/0 test/1
2> t:test(changeme).
Look at hereok
3> t:test(mybad).
mybadok
4>
页:
[1]