Skip to content

Instantly share code, notes, and snippets.

@elbrujohalcon
Created November 6, 2017 19:12
Show Gist options
  • Save elbrujohalcon/7cdb0a4b2b9a249195fe5185e19b5881 to your computer and use it in GitHub Desktop.
Save elbrujohalcon/7cdb0a4b2b9a249195fe5185e19b5881 to your computer and use it in GitHub Desktop.
-module(x).
-export([bad/1]).
bad(A) ->
B = case rand:uniform() of
C when C < 0.5 -> C;
D when D >= 0.5 -> 1 - D
end,
A + B.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment