Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -module(test).
- -export([start/0]).
- -spec start() -> ok.
- start() ->
- AtomBad = get_atom(1),
- AtomGood = get_atom(2),
- check_atom(AtomBad),
- case check_atom(AtomGood) of
- ok -> ok;
- error -> error
- end.
- -spec get_atom(any()) -> good | bad.
- get_atom(1) ->
- bad;
- get_atom(_) ->
- good.
- -spec check_atom(good | nice) -> ok | error.
- check_atom(Atom) ->
- ok.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement