name: simple id: simple inputs: input: 4 index: 0 value: 0 outputs: result: ${ $("value") } steps: - name: init id: init run: | $("value", 0); $("index", 0); - name: cond id: cond branches: - name: "<=input" id: "<=input" if: | let index = $("index"); let input = $("input"); index <= input steps: - name: add id: add next: cond run: | let index = $("index"); let value = $("value"); $("value", value + index); $("index", index + 1); - name: ">input" id: ">input" if: $("index") > $("input") - name: end id: end