import edu.rice.cs.mint.runtime.*;

public class AccumSample {
    public static separable Code<Void> genCode(final int i) {
	return <| { System.out.println(i); } |>;
    }
    public static void main(String[] args) {
	Code<Void> accum = <| { } |>;
	for(int i = 0; i < 10; ++i)
	    accum = <| { `accum; `(genCode(i)); } |>;
	accum.run();
    }
}
