@Override
    String wrap(ChainVariable outVar, String code, StreamToLoopReplacementContext context) {
      String bound = myBound.getText();
      String array = myArray.getText();
      if (!ExpressionUtils.isSafelyRecomputableExpression(context.createExpression(array))) {
        array = context.declare("array", myArrayType.getCanonicalText(), array);
      }
      if (!ExpressionUtils.isSafelyRecomputableExpression(context.createExpression(bound))) {
        bound = context.declare("bound", "int", bound);
      }
      String loopVar = context.registerVarName(Arrays.asList("i", "j", "idx"));
      String element = outVar.getDeclaration(array + "[" + loopVar + "]");
      return context.getLoopLabel() +
             "for(" + "int " + loopVar + " = " + myOrigin.getText() + ";" +
             loopVar + "<" + bound + ";" +
             loopVar + "++) {\n" +
             element +
             code + "}\n";
    }
@Override
    String wrap(ChainVariable outVar, String code, StreamToLoopReplacementContext context)