Created
January 2, 2015 07:01
-
-
Save toopay/b925e97a24b8099b979b to your computer and use it in GitHub Desktop.
Pint in concurrent
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(brewfactory). | |
-export([pint/0]). | |
pint() -> | |
receive | |
{Pid, heinekken} -> | |
Pid ! "Dankjewel!", | |
pint(); | |
{Pid, guiness} -> | |
Pid ! "Thank you!", | |
pint(); | |
{Pid, peroni} -> | |
Pid ! "Grazie!", | |
pint(); | |
{Pid, _} -> | |
Pid ! "You're in wrong place!", | |
pint() | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment