Skip to content

Instantly share code, notes, and snippets.

@jlouis
Created March 25, 2016 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlouis/a6e2c2a6790ccbb98d58 to your computer and use it in GitHub Desktop.
Save jlouis/a6e2c2a6790ccbb98d58 to your computer and use it in GitHub Desktop.
Z
-module(z).
-compile(export_all).
f(X) ->
case X of
<<"A">> -> ok;
<<"B">> -> ok
end.
g(X) ->
case valid(X) of
true -> f(X);
false -> ok
end.
valid(<<"A">>) -> true;
valid(<<"B">>) -> true;
valid(_) -> false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment