first to pass is chosen. Guards in a list of cases are typically parallel. However, in Haskell list comprehensions the guards are in series, and if any of them fails, the list element is not produced. This would be the same as combining the separate guards with logical AND, except that there can be other list comprehension clauses among the guards. Evolution A simple conditional expression, already present in CPL in 1963, has a guard on first sub-expression, and another sub-expression to use in case the first one cannot be used. Some common ways to write this: (x>0) -> 1/x; 0 x>0 ? 1/x : 0 If the second sub-expression can be a further simple conditional expression, we can give more alternatives to try before the last fall-through: (x>0) -> 1/x; (x<0) -> -1/x; 0 In 1966 ISWIM had a form of conditional expression without an obligatory fall-through case, thus separating guard from the concept of choosing either-or. In the case of ISWIM, if none of the alternatives could be used, the value was to be undefined, which was defined to never compute into a value. KRC, a "miniaturized version" of SASL (1976), was one of the first programming languages to use the term "guard". Its function definitions could have several clauses, and the one to apply was chosen based on the guards that followed each clause: fac n = 1, n = 0 = n * fac (n-1), n > 0 Use of guard clauses, and the term "guard clause", dates at least to Smalltalk practice in the 1990s, as codified by Kent Beck. In 1996, Dyalog APL adopted an alternative pure functional style in which the guard is the only control structure. This example, in APL, computes the parity of the input number:parity←{ 2∣⍵ : 'odd' 'even' } Pattern guard In addition to a guard attached to a pattern, pattern guard can refer to the use of pattern matching in the context of a guard. In effect, a match of the pattern is taken to mean pass. This meaning was introduced in a proposal for Haskell by Simon Peyton Jones titled A new view of guards in April 1997 and was used in the implementation of the proposal. The feature provides the ability to use patterns in the guards of a pattern. An example in extended Haskell: clunky env var1 var2 | Just val1 <- lookup env var1