We now rewrite the previous “right_age/1” using “If”,
Getting started with Erlang #2
Vanshdeep Singh
92
seems logical error on if statement.
In my opinion the right code is the next:
right_age(X) ->
if
X > 16, X< 104 -> true;
true -> false
end.
seems logical error on if statement.
In my opinion the right code is the next:
right_age(X) ->
if
X > 16, X< 104 -> true;
true -> false
end.