Skip to content

Instantly share code, notes, and snippets.

@7stud
Created February 21, 2017 03:58
Show Gist options
  • Save 7stud/a9704df542e50cbeef167b39622e70f5 to your computer and use it in GitHub Desktop.
Save 7stud/a9704df542e50cbeef167b39622e70f5 to your computer and use it in GitHub Desktop.
func(X) ->
CanProceed = (X =:= 2) or log_value(X),
if
CanProceed =:= true -> 10;
CanProceed =:= false -> 20
end.
log_value(X) ->
io:format("The value of X was: ~w~n", [X]),
false. %Will never determine the ultimate value of the boolean expression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment