Skip to content

Instantly share code, notes, and snippets.

@jesjos
Created February 26, 2011 11:35
Show Gist options
  • Save jesjos/845130 to your computer and use it in GitHub Desktop.
Save jesjos/845130 to your computer and use it in GitHub Desktop.
Erlang test
main2() ->
spawn(callhome(self)),
receive
done ->
io:format("Done!",[])
end.
callhome(Main) ->
callhome(Main, 10).
callhome(Main, 0) ->
Main! done,
true;
callhome(Main, Y) ->
io:format("~p~n", [Y]),
callhome(Main, Y-1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment