Skip to content

Instantly share code, notes, and snippets.

@sanmiguel
Created June 19, 2013 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sanmiguel/5819105 to your computer and use it in GitHub Desktop.
Save sanmiguel/5819105 to your computer and use it in GitHub Desktop.
-behaviour(gen_ale_drinker).
-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}.
-callback micturate() -> ok | {error, eontherug}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment