HANDBOOK / GENTLE PRIMER / Control Structures /

# Disjunctions

Since an alternative statement succeeds if one of its alternatives succeeds, it can be used to express disjunction ( or connection), whereas the members of a statement sequence express conjunction ( and connection). Alternative statements can be nested. For example,

       'rule' HandleType (Type):
          (|
             (| where(Type -> array(N, T)) || where(Type -> record(List) |)
             HandleStructuredType(Type)
          ||
             HandleSimpleType(Type)
          |)

`HandleStructuredType` is invoked if `Type` matches `array(N,T)` or `record(List)`. Otherwise `HandleSimpleType` is invoked.