(VAR X XS N Y) (RULES pairNs -> cons(0) oddNs -> incr(pairNs) incr(cons(X)) -> cons(s(X)) take(0,XS) -> nil take(s(N),cons(X)) -> cons(X) zip(nil,XS) -> nil zip(X,nil) -> nil zip(cons(X),cons(Y)) -> cons(pair(X,Y)) tail(cons(X)) -> XS repItems(nil) -> nil repItems(cons(X)) -> cons(X) )