; Step with alternating feet, left before right (relation left (i64)) (relation right (i64)) (left 0) (right 0) (ruleset step-left) (rule ((left x) (right x)) ((left (+ x 1))) :ruleset step-left) (ruleset step-right) (rule ((left x) (right y) (= x (+ y 1))) ((right x)) :ruleset step-right) (run-schedule (repeat 10 (saturate step-right) (saturate step-left))) ; We took 10 steps with the left, but the right couldn't go the first round, ; so we took only 9 steps with the right. (check (left 10)) (check (right 9)) (fail (check (left 11))) (fail (check (right 10)))