Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (20 sloc) 389 Bytes
-module(e3).
-compile(export_all).
start() ->
register(?MODULE, spawn(?MODULE, loop, [])).
switch() ->
?MODULE ! code_switch.
compile() ->
compile:file(?MODULE),
code:purge(?MODULE),
code:load_file(?MODULE).
msg() ->
?MODULE ! hello.
loop() ->
receive
code_switch ->
?MODULE:loop();
_ ->
io:format("~p~n", ["bb"]),
loop()
end.
Something went wrong with that request. Please try again.