Created
July 6, 2016 14:34
-
-
Save fmamud/ae4b7ad572abcac2fc3e6d3ca670f6a6 to your computer and use it in GitHub Desktop.
TDC 2016 São Paulo - Palestra: Erlang sem enrolação
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module (tdc). | |
-export ([printer/0, mysum/1, loop/0]). | |
printer() -> | |
io:format("~p~n", ["Bem vindos ao TDC 2016"]). | |
mysum([]) -> | |
0; | |
mysum([H|T]) -> | |
H + mysum(T). | |
loop() -> | |
receive | |
show -> | |
?MODULE:printer(), | |
loop() | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment