You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
%% function_patterns(LambdaForm) -> {Arity,Patterns}.%% macro_patterns(LambdaForm) -> Patterns.%% Given a {match-,}lambda form, attempt to return its patterns (or%% arglist). N.B. A guard is appended to its pattern and Patterns is%% a list of lists. A macro definition must have two args, the pattern%% and the environment.
-specfunction_patterns(LambdaForm) -> {Arity,Patterns} whenLambdaForm::nonempty_list(),
Arity::non_neg_integer(),
Patterns::nonempty_list(pattern()).
-specmacro_patterns(LambdaForm) ->PatternswhenLambdaForm::nonempty_list(),
Patterns::nonempty_list(pattern()).
For 1.1.1:
I think I would prefer to separate them, sort of {Patterns,GuardTests}.
Activity
rvirding commentedon Jun 15, 2016
Yes, to separating the patterns and guards in that fashion. However the API has changed so it mightn't be those functions where you see it.
Store and return doc pattern/guard as {pattern,guard}