此内容没有您所选择的语言版本。
21.5. Fibonacci Example: Bootstrap Rule
- When a
Fibonacci
object with a sequence field of 2 is asserted the Bootstrap rule is matched and activated along with the Recurse rule. - Note the multi-restriction on field
sequence
, testing for equality with 1 or 2. - When a
Fibonacci
object with a sequence of 1 is asserted the Bootstrap rule is matched again, causing two activations for this rule. The Recurse rule does not match and activate because thenot
conditional element stops the rule's matching as soon as aFibonacci
object with a sequence of 1 exists.