Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -module(foo).
- -export([bar/1]).
- bar(X) ->
- case correct(X) of
- 42 -> f(X)
- end.
- correct(X) ->
- case f(X) of
- 1 -> 42;
- Y when Y > 5 -> 42;
- _ -> 0
- end.
- f(X) ->
- case X of
- 6 -> 1;
- 1 -> 7;
- 3 -> 5;
- _ -> 23
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement