this
Placeholder
Flow.apex has a placeholder for the current Flow, and it is Flow.self
.
Flow f = new Flow()
.inputAs('n').returnInteger()
.doIf(
Flow.call(R.equals.apply(0), Flow.getVar('n')),
Flow.block()
.doReturn(0)
)
.var('ret', Flow.call(R.add.apply(2), Flow.call(Flow.self, Flow.call(R.dec, Flow.getVar('n')))))
.doReturn(Flow.getVar('ret'));