-
-
Save aerosol/5831213 to your computer and use it in GitHub Desktop.
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(gen_ale_drinker). | |
%% There are 2 types of drink: | |
-type style() :: ale | not_ale. | |
%% Need to support imperial measurements (not US pints though) | |
-type volume() :: {imperial_pint, non_neg_integer()} | {litre, non_neg_integer()}. | |
-type beverage() :: {style(), volume()}. | |
-callback drink(beverage()) -> ok | {error, ebeeroverflow}. %% This should never happen | |
-callback micturate() -> ok | {error, eontherug}. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment