(VAR f x xs y ) (RULES app(app(plus,0),y) -> y app(app(plus,app(s,x)),y) -> app(s,app(app(plus,x),y)) app(app(sumwith,f),nil) -> nil app(app(sumwith,f),app(app(cons,x),xs)) -> app(app(plus,app(f,x)),app(app(sumwith,f),xs)) )