Homepage
Sign in / Sign up
Go to the profile of Mike Gavrilov
Mike Gavrilov
Mar 2, 2016
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.
Erlang
  • Go to the profile of Mike Gavrilov

    Mike Gavrilov

    • Share
    Go to the profile of Mike Gavrilov
    Never miss a story from Mike Gavrilov, when you sign up for Medium. Learn more
    Never miss a story from Mike Gavrilov