PsiStatement (@NotNull String variable, @NotNull ImmutableCollectionModel model, @NotNull PsiStatement anchor) { if (!model.myIsVarArgCall) return anchor; return StreamEx.of(createUpdates(variable, model)) .map(update -> myElementFactory.createStatementFromText(update, null)) .foldLeft(anchor, (acc, update) -> BlockUtils.addAfter(acc, update)); }