According to the documentation, /; can be used in three different ways,
illustrated below:
A. pattern /; condition = definition
B. pattern := definition /; condition
C. pattern := Module[{}, definition /; condition]
Real examples for testing:
f[x_] /; (Print["cond"]; x > 5) := (Print["def"]; x)
g[x_] := (Print["def"]; x) /; (Print["cond"]; x > 5)
h[x_] := Module[{}, Print["def"]; x /; (Print["cond"]; x > 5)]
Usage C differs from A and B in that 'definition' is always evaluated,
and it is evaluated before 'condition'. But I cannot see *any*
difference in meaning between A and B.
Is B completely redundant? Could someone show an example where an A
type and a B type definition behave differently? Is there any situation
where B can be used, but A cannot? (A is more general: it can be used
with any pattern, while B is restricted to use with SetDelayed and
similar functions.) Is B provided solely as a more readable syntax?
Szabolcs
P.S. Unfortunately usage C is "hidden" in the docs. IMO, since it's
*meaning* (and not only syntax) is different from that of A and B, it
deserves a more prominent place in the docs.