First class coroutine continuations?

Let me be a bit more concrete – I would like to support the following syntax:

infer(method="enumerate") { if flip() 1 else if flip() 2 else 3 }

The behavior of the enumeration inference method is to explore all possible executions of the program; in this case, the possible return values of true or false for each invocation of flip (a suspending function). The end result would be a distribution mapping 1 to 0.5, 2 to 0.25, and 3 to 0.25. flip could have been implemented by calling its continuation multiple times if multi-shots were allowed.

The approach given by the paper’s parser example relies on lifting patterns to generators and using special combinators… kind of like LINQ syntax. That approach does work to implement an inference engine, but it is not the webppl-like abstraction above that I was hoping to get by using Kotlin’s coroutines.