repeat
while and for are just repeating blocks
Repeat
KotlinPoetDSL offers supports for three very basic repeats. There is not a lot to talk about, to be honest. But on the positive side, boring code and implementations are often the best.
for
can be written as:
before V0.2, the repeat inside code-block which accepts a number doesn't map to KotlinPoetDSLs repeat but to kotlins repeat. (KotlinPoetDSL made a mistake by temporarily removing it).
while
while is reserved, so I called it repeatWhile.
maps to
if you want one more than forever, use do-while.
This can be written in two ways:
Last updated