import "StandardLibrary" mapping relation M Integer (Integer,Integer) rule Mix where @when M ?a (?b, ?c) ?a <= 10 @where M (?a + 1) (?c, ?b) rule PrintIt where @when M ?a (?b,?c) @to Execute (print "\(?a) -> \(?b), \(?c)") rule Seed where @where M 0 (1,?x) M 10 (?y,2) main = transformation OneShotForward where -- 11 -> 2, 1 10 -> 1, 2 9 -> 2, 1 8 -> 1, 2 7 -> 2, 1 6 -> 1, 2 5 -> 2, 1 4 -> 1, 2 3 -> 2, 1 2 -> 1, 2 1 -> 2, 1 0 -> 1, 2 ()