In the last session, I mentioned that Alternatives (a pattern object) and Or (a function) are not interchangeable. Here's an example to demonstrate how they differ.
Consider trying to extract all of the cases from a list that are either 2 or True. Using Alternatives (|) gives the correct result:
Cases[{1, 2, 3, True, 4}, 2 | True]
(* {2, True} *)
However, using Or (||) gives an incorrect result:
Cases[{1, 2, 3, True, 4}, 2 || True]
(* True *)
This is because Or immediately evaluates if any of its arguments resolve to True or False. In this case, 2||True evaluates to True, so Cases only picks out the items that match True.