风格一:
a(X) when X>1 ->
...omitted;
a(X) when X ->
...omitted.
风格 2
a(X) ->
case X>1 of
true-> ...ommited;
false-> ...ommited
end.
====更新===
正如@rving 所说,我将比较更新如下:
风格一:
a(X) when X>1 ->
...omitted;
a(X) ->
...omitted.
风格 2
a(X) ->
case X>1 of
true-> ...ommited;
false-> ...ommited
end.