Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 3

The compound event operators used previously were given as infix, binary operators. (The term infix describes operators that are placed syntactically between their operands.) Event expressions also allow variable arity event operators that provide more convenient methods of expressing patterns over large numbers of events. (The term arity refers to the number of parameters a function takes. Variable arity functions can take a variable number of parameters.) Using compound operators in this way follows this pattern:

Code Block
themeConfluence
languagejavascript
themeConfluence
select when <eventop>(E1,[el]En)

In the previous example, <eventop> is one of or, and,   before, after, or then. Variable arity functions are merely a convenience because their semantics can be expressed using the binary operators. For example, the following two select statements are equivalent:

Code Block
themeConfluence
languagejavascriptthemeConfluence
select when and(A, B, C, D, E)
select when A and (B and (D and (C and E)))

...