[erlang-questions] Reading, Learning, Confused

Sean Allen sean@REDACTED
Sat Jul 19 15:26:36 CEST 2008


by a small bit of example code in Programming Erlang related to guards  
and short circuit booleans:

  f(X) when (X == 0) or (1/X > 2) ->
     ...

g(X) when (X == 0) orelse ( 1/X > 2) ->
    ...

The guard in f(X) fails when X is zero but succeeds in g(X)

Can someone explain why?




More information about the erlang-questions mailing list