Here is an example for a Sketch that writes code
It generates for loop, your Sketch B generates code with + etc.